Skip to content

Instantly share code, notes, and snippets.

@dtaivpp
Last active October 11, 2019 02:04
Show Gist options
  • Save dtaivpp/09b5096602e7106ea88e70482a392f0c to your computer and use it in GitHub Desktop.
Save dtaivpp/09b5096602e7106ea88e70482a392f0c to your computer and use it in GitHub Desktop.
# Initialization
list = ["Lists", "Is", "Pretty", "Sweet"]
# Assigning an index a new value
list[1] = "Are"
# Extending a list
list.append("Cool")
# Removeing from the end
print(list.pop(-1))
#>>> Sweet
# Iteration
for item in list:
print(item + " ")
#>>> Lists Are Pretty Cool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment