On May 5, 7:03 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > This is more for my education and not so much for practicality. > [snip] > > A second question is: When can you use += vs .append(). Are the two always > the same? >
Formally, they can never be the same. They can be used to produce the same result, in limited circumstances, e.g. these: alist += bseq and alist.append(anelement) will give the same result if bseq == [anelement] You can use alist.extend(bseq) instead of alist += bseq I suggest that you (a) read the manual sections on each of the 3 possibilities (b) explore their behaviours at the Python interactive prompt -- http://mail.python.org/mailman/listinfo/python-list