3.2 - Lists and Loops
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
Define a list of three vegetables.
💡 Hint: Remember to use square brackets!
What does fruits.append('orange') do?
💡 Hint: Think about the structure of lists.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the output of fruits = ['apple', 'banana']; for fruit in fruits: print(fruit)?
💡 Hint: Think about how for loops work.
True or False: Lists in Python can contain different data types.
💡 Hint: Recall the flexibility of lists.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Given a list of numbers, write a function that returns a new list with each number doubled.
💡 Hint: Use list comprehension for a concise solution.
How would you count how many times each fruit appears in a list?
💡 Hint: Think about how to use dictionaries to track counts.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.