列表生成式 a = [x for x in range(10)] print(a) x 可进行操作 a = [x*2 for x in range(10)] print(a) x甚至可以为函数, def f(n): return n*n*n a = [f(x) for x in range(10)] ######################## 赋值方法 t = ('123',8)a,b = tprint(a)print(b)#############a =(x for x in range…