it copies the list
On Tue, Jul 22, 2014 at 6:17 PM, fl <rxjw...@gmail.com> wrote: > 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 > > Thanks for your example. I do not find the explanation of [:] on line. > Could you > explain it to me, or where can I find it on line? > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com
-- https://mail.python.org/mailman/listinfo/python-list