[python-users] Was Kapput?

do_not_reply_to_this_address at t-online.de do_not_reply_to_this_address at t-online.de
Sa Jun 6 12:58:42 CEST 2009


Moin,
irgendwas kommt mir hier spanisch vor. Python 3.0 liefert nicht das 
Ergebnis was ich erwarte.
wenn ich die Zeile nach
b=[1,2,3,4,5]
ändere ist wieder alles Ok. Aber das will ich nicht.
Gruß Dirk

b=map(lambda x:x,[1,2,3,4,5])
x=iter(b)
print( next(x))
y=iter(b)
print( next(y))

"""
output:
1
2

expected:
1
1
"""



Mehr Informationen über die Mailingliste python-users