Hi Shi, For what you're doing, nothing at all.
When you use a colon, slice syntax, it defaults to [start:end] so p = a[:] is the same as p = a[0:len(a)] Regards, Liam Clarke On 11/11/05, Shi Mu <[EMAIL PROTECTED]> wrote: > what is the difference between the two ways of assigning the list? > p=a vs. p=a[:] > >>> a=range(5) > >>> a > [0, 1, 2, 3, 4] > >>> p=a > >>> p > [0, 1, 2, 3, 4] > >>> p=a[:] > >>> p > [0, 1, 2, 3, 4] > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor