Practice Reassigning Lists (12.2.2) - Manipulating lists - Data Structures and Algorithms in Python
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Reassigning Lists

Practice - Reassigning Lists

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

What does the append method do in Python lists?

💡 Hint: Think about it as adding one more item.

Question 2 Easy

If list1 is [1, 2, 3] and you set list2 = list1, what happens if you alter list1?

💡 Hint: Consider if they share the same backpack!

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What happens if you use the + operator to combine two lists?

Modifies the first list
Creates a new list
Does nothing

💡 Hint: Think about how you combine two sets of apples!

Question 2

True or False: The extend method can take any iterable to add its elements to a list.

True
False

💡 Hint: Imagine pouring a juice mix from a container!

1 more question available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Create a function that accepts two lists and returns a new list that contains elements that are in the first list but not in the second.

💡 Hint: Think of it like sorting your toys and removing those you no longer want!

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.