Last active
May 26, 2019 10:59
-
-
Save Linus-Albertus/312a3eb129cf503b61e883b530bb74c7 to your computer and use it in GitHub Desktop.
[reverse list] Reverse a list #reversed #list #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original_list = ['foo', 'bar'] | |
reversed_list = list() | |
for l in reversed(original_list): | |
reversed_list.append(l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment