Why can't you assign to a list in a loop without enumerate?
Roberto.Bonvallet at cern.ch
Wed Nov 1 14:47:49 CET 2006
Bjoern Schliessmann wrote:
> Fredrik Lundh wrote:
>> what's wrong with using enumerate? or a list comprehension? or
>> some other of the many different ways you can use to build a list
>> from a set of values?
> Shouldn't there be one -- and preferably only one -- obvious way to
> do it? 8)
The obvious one is to use enumerate.
TOOWTDI allows less obvious ways to exist.
More information about the Python-list