Skip to content

Instantly share code, notes, and snippets.

@nightwarriorftw
Last active April 20, 2020 20:37
Show Gist options
  • Save nightwarriorftw/2812d76331907faa4c98a6b7fb7c84f4 to your computer and use it in GitHub Desktop.
Save nightwarriorftw/2812d76331907faa4c98a6b7fb7c84f4 to your computer and use it in GitHub Desktop.
#! /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