Last active
April 20, 2020 20:37
-
-
Save nightwarriorftw/2812d76331907faa4c98a6b7fb7c84f4 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env python3 | |
def main(): | |
oldList = [1, 2, 3, 4] # defining and initialising the list | |
print(oldList) # print the list | |
reversedList = oldList[::-1] # reversing the list | |
print(reversedList) # printing the reverse list | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment