python的函数传递 Posted on 2018-01-02 12345a = 1def fun(a): a = 2fun(a)print(a) #1 12345a = []def fun(a): a.append(1)fun(a)print(a) #[1] 在python中,strings, tuples, 和numbers是不可更改的对象,而 list, dict, set 等则是可以修改的对象