Python的函数参数传递

a = 1
def fun(a):
a = 2
fun(a)
print a # 1

a = []
def fun(a):
a.append(1)
fun(a)
print a # [1]
上一篇:Vs code 设置


下一篇:qsort函数详解