Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dangoldin
· 15y ago · 0 comments
Something else that's interesting is reversing a list but not in place: x[::-1]
The built-in reverse() method will do it in place.
Comments
[–]
sdevlin
15y ago
There is also the top level reversed() function that takes some sequence and returns a reversed iterator.