1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
A list is used to store multiple items in one variable. Items are written inside square brackets [ ] and separated by commas. A list is created using _______________
my_list = ["item1", "item2"]
The _______________ function adds a new item to the end of the list.
append()
The _______________ function deletes an item from the list by value.
remove()
The function used to display output on the screen is _______________.
print()
Comments are notes written for humans to read and are ignored by Python when running the code. This is denoted by _______________.
#
To get the number of items in a list, you use the _______________ function.
len()
A loop goes through each item in the list one by one. The syntax for traversing a list looks like _______________.
for item in my_list:
print(item)