modifying iterator value.

Leif K-Brooks eurleif at ecritters.biz
Wed Apr 26 16:13:48 EDT 2006


chun ping wang wrote:
> i want to modify an iterator value.
> 
> for x in someList
>    x = 1

for index, value in enumerate(someList):
     someList[index] = 1



More information about the Python-list mailing list