New submission from Stefan Sonnenberg-Carstens:
a = {}
a['a'] = [1,2,3,4,5]
a['b'] = [1,2,3,4,5]
a['c'] = [1,2,3,4,5]
for k in a.keys():
... print a[k]
... for t in a[k]:
... del a[k][a[k].index(t)]
... print a[k]
...
[1, 2, 3, 4, 5]
[2, 3, 4, 5]
[2, 4, 5]
Amaury Forgeot d'Arc added the comment:
This is the expected behaviour.
See the warning paragraph at the bottom of
http://docs.python.org/ref/for.html
--
nosy: +amaury.forgeotdarc
resolution: - invalid
status: open - closed
__
Tracker [EMAIL PROTECTED]