Why can't you assign to a list in a loop without enumerate?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Nov 1 15:08:21 EST 2006


Fredrik Lundh wrote:

> "enumerate" is the obviously right thing for this, sure.

K.

> but it's not necessarily the right thing for the OP's "I want to
> create a new list based on an existing list".  modifying the
> existing list is usually not the most efficient way to do that.

Agreed.

Regards,


Björn

-- 
BOFH excuse #418:

Sysadmins busy fighting SPAM.




More information about the Python-list mailing list