Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Define a list of three vegetables.
Remember to use square brackets!
What does fruits.append('orange') do?
Think about the structure of lists.
What is the output of fruits = ['apple', 'banana']; for fruit in fruits: print(fruit)?
Think about how for loops work.
True or False: Lists in Python can contain different data types.
Recall the flexibility of lists.
Given a list of numbers, write a function that returns a new list with each number doubled.
Use list comprehension for a concise solution.
How would you count how many times each fruit appears in a list?
Think about how to use dictionaries to track counts.
6 more questions in this section. Enroll free to practise them all.
Enroll free