Skip to content

Instantly share code, notes, and snippets.

@alikarimi120
Created March 1, 2022 09:05
Show Gist options
  • Save alikarimi120/355847747bca2f77345a65c1c24e220a to your computer and use it in GitHub Desktop.
Save alikarimi120/355847747bca2f77345a65c1c24e220a to your computer and use it in GitHub Desktop.
xs = [3, 1, 2] # Create a list
print(xs, xs[2])
print(xs[-1]) # Negative indices count from the end of the list; prints "2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment