Learn how to add and remove items from a list in Python.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_me...
~ CODE ~
ADDING ITEMS TO LIST
shopping_list = ["apples", "bananas", "carrots", "potatoes"]
item = input("What item would you like to add to the shopping list: ")
shopping_list.append(item)
print(shopping_list)
REMOVING ITEMS FROM LIST
shopping_list = ["apples", "bananas", "carrots", "potatoes"]
item = input("What item would you like to remove from the shopping list: ")
shopping_list.remove(item)
print(shopping_list)
Auf dieser Seite können Sie das Online-Video Python - Adding & Removing Items from Lists Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Geek Tutorials 09 Januar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 29,327 Mal angesehen und es wurde von 251 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!