> Also, how to practically walk in reverse order in a list without
> copying it (e.g. items[::-1]),
> especially if i need both indexes and items (couldn't find with
> enumerate()).
>
Are you looking for reversed()?
The way you are doing it is probably OK.
But it can be simplified thus:
keys = []
target = []
for item in reversed(items):
if not item[0] in keys:
keys.append(item[0])
target.append(item)
print target
If this is not what you wanted,then I have misunderstood your
requirement and just based it on your code.
Thanks,
Senthil
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor