Created
May 8, 2019 20:06
-
-
Save ItsCosmas/3641bf9ba4ebf5a47c8e36785a44f8a2 to your computer and use it in GitHub Desktop.
Lists
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
list = [12] | |
print("========= INSERT ============") | |
list.insert(0, 5) | |
print(list) | |
list.insert(1, 10) | |
print(list) | |
list.insert(2, 6) | |
print(list) | |
print("========= REMOVE ============") | |
list.remove(6) | |
print(list) | |
print("========= APPEND ============") | |
list.append(9) | |
print(list) | |
print("========= SORT ============") | |
list.sort() | |
print(list) | |
print("========= POP ============") | |
list.pop() | |
print(list) | |
print("========= REVERSE ============") | |
list.reverse() | |
print(list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment