[Python-3000] Drop list.reverse()?

Raymond Hettinger python at rcn.com
Fri Feb 15 02:06:32 CET 2008


[Steven]
> But .reverse() is in-place, while the other two create new sequences, no? 

reversed(s) creates an iterator and s[::-1] creates a new list.  They are not the same as s.reverse() but the use cases overlap quite a bit.


Raymond


More information about the Python-3000 mailing list