[Tutor] list iteration

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Mon May 3 04:22:22 EDT 2004

hi everybody,

when iterating through lists, may I assume that for all intents and
purposes, 'for item in itemslist' is the same as
'for item in itemslist[:]' ?  I first encountered the latter statement
today, and am puzzled why one would use it as opposed to the former, which
seems simpler and more straightforward.

More information about the Tutor mailing list