Last active
January 27, 2018 04:24
-
-
Save Ventsislav-Yordanov/e8aff8283307e093083ec24a3607a743 to your computer and use it in GitHub Desktop.
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
# Add values to a list | |
fruits.append("peach") | |
fruits # ["pineapple", "apple", "lemon", "strawberry", "orange", "kiwi", "peach"] | |
fruits = fruits + ["fig", "melon"] | |
fruits # ["pineapple", "apple", "lemon", "strawberry", "orange", "kiwi", "peach", "fig", "melon"] | |
# Change values from a list | |
fruits[0:2] = ["grape", "mango"] | |
fruits # ["grape", "mango", "lemon", "strawberry", "orange", "kiwi", "peach", "fig", "melon"] | |
# Delete values from a list | |
fruits.remove("mango") | |
fruits # ["grape", "lemon", "strawberry", "orange", "kiwi", "peach", "fig", "melon"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment