Skip to content

Instantly share code, notes, and snippets.

@SushmaBaliza
Last active June 3, 2020 13:36
Show Gist options
  • Save SushmaBaliza/75280a23ed29213299affe5a969a8d99 to your computer and use it in GitHub Desktop.
Save SushmaBaliza/75280a23ed29213299affe5a969a8d99 to your computer and use it in GitHub Desktop.
list_1 = ['c', 'o', 'd', 'e', 'r', 'e', 'f', 'e', 'r']
# Print using Negative Indexing
print(list_1[-2])
print(list_1[-5])
# provided out of range index
print(list_1[-10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment