Practice - Introduction to Lists
Practice Questions
Test your understanding with targeted questions
What is the syntax to create a list named 'colors' containing red, green, and blue?
💡 Hint: Remember to use square brackets.
How would you retrieve the second item from a list named 'fruits'?
💡 Hint: Indexing starts at 0!
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does slicing a list mean?
💡 Hint: Think about how you define the part you want.
True or False: Lists in Python can only contain elements of the same type.
💡 Hint: Recall the example of a mixed list.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a list of your favorite movies, then create a nested list where each sub-list contains the movie's title, year released, and a rating out of 10.
💡 Hint: Think about how to structure your data.
Given a list containing mixed data types: mixed_data = [123, 'hello', [1, 2, 3], True], write a Python command to replace 'hello' with 'world'.
💡 Hint: Remember that indexing starts at 0 when wanting to change 'hello'.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.