On 28/06/2008, Dick Moores <[EMAIL PROTECTED]> wrote: > I'm very familiar with appending x to a list, s, using s.append(x), however, > I've never understood what the docs mean by > > s.append(x) same as s[len(s):len(s)] = [x]
In addition to Douglas's comment, do you understand how assignment with slices works? e.g. can you predict the result of the following operations without trying it? a = [1, 2, 3, 4] a[1:3] = [7, 8] print a -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor