Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Jovan Dandridge
12,835 PointsManipulating List 3 of 3 not working... or is there something wrong?
im not able to get this to work and I did everything the video says
the_list = ["a", 2, 3, 1, False, [1, 2, 3]]
# Your code goes below here
list = the_list
list.pop(3)
list.insert(0, 1)
list.remove("a")
list.remove(False)
list.remove([1, 2, 3])
list.extend(range(4, 21))
2 Answers

Chris Freeman
Treehouse Moderator 68,166 PointsThe challenge is looking for the variable the_list
. Your code manipulates a list
instead. Rename all your statements to use the_list
.

Jovan Dandridge
12,835 PointsThanks Chris Freeman it works.
Chris Freeman
Treehouse Moderator 68,166 PointsChris Freeman
Treehouse Moderator 68,166 PointsJovan, technically your code produces the correct answer. The grader is not smart enough to know it.
When you copied the list using
list = the_list
, you are actually only copying the reference to the list. An item can be identified by its "id". In the code below, you can see thatlist
andthe_list
have the same id and the same value at the end of the code:Results: