python函数,传递列表可以修改,普通变量只在函数内生效 def a(b): b[0]=1 b1 = [0] a(b1) print(b1) def c(d): d = 5 d1 = 2 c(d1) print(d1) [1] 2