Skip to content

Instantly share code, notes, and snippets.

@ItsCosmas
Created May 8, 2019 20:06
Show Gist options
  • Save ItsCosmas/3641bf9ba4ebf5a47c8e36785a44f8a2 to your computer and use it in GitHub Desktop.
Save ItsCosmas/3641bf9ba4ebf5a47c8e36785a44f8a2 to your computer and use it in GitHub Desktop.
Lists
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