def test(x,theList):
theList.append(x)
if x < 2:
x = x + 1
test(x,theList)
print x
print theList
test(1,[])
为什么结果是[1,2]?不仅[1]?
def test(x,theList):
theList.append(x)
if x < 2:
x = x + 1
test(x,theList)
print x
print theList
test(1,[])
为什么结果是[1,2]?不仅[1]?