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!
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 trial
Daniel Lodestro2,572 Points
ValueError, please help! (Python) This seems so easy, but what am I doing wrong?
There was only a 15 second portion of the video prior to this exercise that covered .remove. I'm confused since it looks so different from what was in the video. I guess I'm just not understanding the syntax or the method.
Thank you in advance!
states = [ 'ACTIVE', ['red', 'green', 'blue'], 'CANCELLED', 'FINISHED', 5, ] states.remove(['blue'])
So in this first task you are being asked to remove the last item in the list. It's referring to the last item in the states list so you need to remove the 5.
The color list is a list within the states list. That entire list is considered an item or element of the states list.