parameter passing in python DEMO

来源:互联网 发布:淘宝衣服上的胸围是指 编辑:程序博客网 时间:2024/05/01 11:27
x = 10L = []def foo(x, L):    x += 100    L.append(1000)    print 'inside foo, x == ', xfoo(x, L)print 'outside foo, x == ', xprint L
inside foo, x ==  110outside foo, x ==  10[1000]


0 0