Create a grocery list #
Try and create a nested list for your grocery shopping. All the elements in the list should also be a list where the first element is the name of the item, and the second element of the list is the amount.
For example:
my_grocery = [
["Apple", 1],
["Banana", 10],
]
Exercise #
- Create a variable
my_groceryfor your grocery shopping list - The list should have at least 5 elements (5 items you need to buy)
- The first element of the sub-elements is the item name of type
string - The second element of the sub-elements is the amount of type
int
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules