已采纳回答 / 无尾熊啾啾
额,你是小小白吧。。。没基础还是买本书仔细看,这教程讲的内容太少了。他开始先是定义了sum就是总分为0.0这个值,然后通过for循环语句每次从list中拿一个数,就是sum=sum+x的意思就是自增了x,x是每次从list中拿的数,不知道你懂了没,这都是基础的东西,基本上你学过java看这些应该都能看懂,就是语法不太一样
2019-03-27
已采纳回答 / 慕仰6034142
# -*- coding: utf-8 -*-L=['王',100,'孙',99]print str(L).decode('string_escape')
2019-03-26
已采纳回答 / Close_0
因为 ‘Adam’是字符串,而d['Adam']返回int类型的95.Python 不支持这两种类型用‘+’号连接,输出的话用‘,’即可
TypeError: unsupported operand type(s) for +: 'int' and 'str'
2019-03-24
已采纳回答 / 慕桂英9269908
因为是递归的,所以在move(n)递归给move(n-1)的时候,move(n-1)会继续递归给move(n-2),如此递归下去,最后是move(1),move(1)的值会返回到move(2)中,move(2)的值会返回到move(3)中,再继续如此依序返回,最后整个的结果最开始其实是从move开始的
2019-03-24
已采纳回答 / gogod
x = [0,1,2,3,4,5,6,7,8,9]for a in x: for b in x: if a>0 and a<b: print a*10+ b我自己试了一下,海星
2019-03-21
已采纳回答 / Athrundyj
d={'school':{'clsaa':'student'}} for a,y in d.items(): for b,v in y.items(): print v(求采纳)
2019-03-19