Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialcourtney seward
3,292 PointsPlease help. I don't understand what I am doing wrong on the last question in this section.
I am having a hard time understanding what I am not add or taking out on the 2nd part to this quiz
states = [
'ACTIVE',
['red', 'green', 'blue'],
'CANCELLED',
'FINISHED',
5,
]
states.remove(5)
states.remove({'red', 'green' 'blue'})
2 Answers
Ryan S
27,276 PointsHi Courtney,
There are a couple issues. First, check which type of brackets you are using in your .remove()
method. They need to be square brackets, not curly. Square brackets define a list whereas curly braces define a dictionary so it is important not to mix them up (you will learn about dictionaries in a later course) .
And second, you are missing a comma in your list.
Good luck.
Taylor Schimek
19,318 Pointsthe item you're trying to remove is a list. you are using { } instead of [] in your states.remove()