Gary Herron wrote:

> Or you can create a new reversed (copy of the original) list and iterate 
> through it
> 
> for item in reversed(L):
>   print item

It's not a copy, it's a view:

>>> items = [1,2,3]
>>> r = reversed(items)
>>> items[:] = "abc"
>>> for item in r: print item
...
c
b
a

Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to