Remove items from a list
Alex Martelli
aleaxit at yahoo.com
Wed Sep 8 12:27:16 EDT 2004
Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
...
> And I'm not sure what Python does on the end of the list; is the
> termination dynamic (ie, it stops whenever the shortened list ends) or
> is based on the original length...
The former: it's based on an IndexError being raised when the index
becomes too big for the list (so a nice MemoryError will result from
for x in mylist: mylist.append(x)
but that's another issue;-).
Alex
More information about the Python-list
mailing list