The Python Oracle

How do I reverse a list or loop over it backwards?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Peaceful Mind

--

Chapters
00:00 Question
00:29 Accepted answer (Score 1608)
00:51 Answer 2 (Score 1492)
01:08 Answer 3 (Score 448)
01:28 Answer 4 (Score 51)
09:43 Thank you

--

Full question
https://stackoverflow.com/questions/3940...

Question links:
[How can I get a reversed copy of a list (avoid a separate statement when chaining a method after .reverse)?]: https://stackoverflow.com/questions/4280.../

Accepted answer links:
[reversed]: https://docs.python.org/3/library/functi...
[list]: https://docs.python.org/3/library/stdtyp...

Answer 2 links:
[here]: http://docs.python.org/release/2.3.5/wha...
[documentation]: http://docs.python.org/library/functions...

Answer 3 links:
[list.reverse]: https://docs.python.org/3/library/stdtyp...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #list

#avk47