At 01:37 PM 9/30/2006, Shantanoo Mahajan wrote: >Maybe following is helpful: > > >>> a=[3,2,1] > >>> b=a[:] > >>> b.sort() > >>> c=sorted(a) > >>> print a,b,c > >>> [3, 2, 1] [1, 2, 3] [1, 2, 3] > >>> > >Shantanoo
Sorry to be dense, but I don't see what showing what happens to a copy of list a adds to the explanation: >>> a = [3,2,1] >>> b = a[:] >>> b.sort() >>> b [1, 2, 3] >>> given that: >>> a = [3,2,1] >>> a.sort() >>> a [1, 2, 3] >>> I suppose I've misunderstood how you were trying to assist me. Thanks, Dick _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor