>Does a poor job AFAIAC of explaining the difference between foo and bar in foll>>>> def foo(x): x += 2 >>>> def bar(x): x.append(2) >>>> a=10 >>>> b=[10] >>>> foo(a) >>>> a >10 >>>> bar(b) >>>> b >[10, 2] >>>> Or with just one function: >>> def baz(x,y): x += y >>> a = 10 >>> b = [10] >>> baz(a,a) >>> a 10 >>> baz(b,b) >>> b[10, 10]
-- https://mail.python.org/mailman/listinfo/python-list