On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > On 07/22/2014 01:35 PM, Peter Pearson wrote: > def reassign(mylist): # no reason to shadow the list builtin > mylist[:] = [0,1] > > mylist = [1] > reassign(mylist) > mylist > > Emile
I have a new question on the code. When I run it in a file on PythonWin, 'mylist' does not echo anything on the screen. While I enter the command line by line, 'mylist' shows the result: >>> mylist [0, 1] What mechanism is involved? Thanks, -- https://mail.python.org/mailman/listinfo/python-list