Skip to content

Instantly share code, notes, and snippets.

View slingam00's full-sized avatar

Sanjeev Lingam-Nattamai slingam00

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
myList = ['a', 'b', 'c', 'd', 'e']
print(myList[1:3]) # Result: ['b', 'c']
print(myList[0:4]) # Result: ['a', 'b', 'c', 'd']
myList = [1, 2, 3, 4, 5]
# List Indexing
print(myList[0]) # Result: 1
print(myList[2]) # Result: 3
print(myList[4]) # Result: 5
print(myList[-1]) # Result: 5