Exercise about The List Methods 

Run Settings
LanguagePython
Language Version
Run Command
# Exercise List Methods # SCROLL FOR ANSWERS! # using this list, basket = ["Banana", "Apples", "Oranges", "Blueberries"] # 1. Remove the Banana from the list # 2. Remove "Blueberries" from the list. # 3. Put "Kiwi" at the end of the list. # 4. Add "Apples" at the beginning of the list # 5. Count how many apples in the basket # 6. empty the basket # 1. Remove the Banana Fromt he List basket.remove("Banana") print(basket) # 2. Remove Blueberries from the list basket.remove("Blueberries") print(basket) # 3. Put "Kiwi" at the end of the list basket.append("Kiwi") print(basket) # 4. Add "Apples" at the beginning of the list basket.insert(0, "Apples") print(basket) # 5. Count how many apples in the basket print(basket.count("Apples")) # 6. Empty the List basket.clear() print(basket)
Editor Settings
Theme
Key bindings
Full width
Lines