Danny Yoo wrote:
On Wed, 12 Jan 2005, Orri Ganel wrote: True. The only difference is the use of "for i in range(len(...))" instead of "for i in ...". I suppose either works, but since Python only allows you to edit the elements of a sequence using the "for i in ..." notation (and have the changes stick) inside of a list comprehension (and perhaps a generator, as well, I don't know), I try to stay away from it so I don't get confused when it doesn't work outside of one. Cheers, Orri -- Email: singingxduck AT gmail DOT com AIM: singingxduck Programming Python for the fun of it. |
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
