求帮助,Python闭包和返回函数问题答:(1)unpack tuple和list, 可以让函数返回多个值 def count():return (1, 2, 3) # 或者 return [1, 2, 3]把列表解包,把1 2 3 分别赋值给 a b c a, b, c = count()print a, b, c 输出 1, 2, 3 (2)假设你知道Python的dict类型。Python中,在函数中定义一个变量的时候,会...
python中{dict}[list]这个格式返回的结果是什么?答:python中{dict}[list]这个格式返回的结果是:{'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9}[s[0]]{'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9}[s[1]]……'0':0,'1':1,'2':2,'3':3,'...