20 - LIST – Python Data Structures
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
What is the output of fruits = ['apple', 'banana', 'mango']; print(fruits[1])?
💡 Hint: Remember to check the index starting from 0.
How do you create an empty list in Python?
💡 Hint: Use square brackets without any content.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the correct way to create a list in Python?
💡 Hint: Think about the symbols used to denote different data structures.
True or False: Lists in Python cannot contain duplicate values.
💡 Hint: Consider the definition of what makes a list unique.
3 more questions available
Challenge Problems
Push your limits with advanced challenges
Write a function that takes a list of numbers as input and returns a new list containing only the even numbers from the given list.
💡 Hint: Think about how you can use list comprehension to filter the items.
Create a nested list showing a 3x3 matrix and write a piece of code to change the middle value to zero.
💡 Hint: Access the middle item via its row and column indices.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.