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 trialAlistair Murphy
743 Pointsstill stuck on this, please somebody "did you use .romove () error ?
put me out of my misery i beg xD
states = [
'ACTIVE',
['red', 'green', 'blue'],
'CANCELLED',
'FINISHED',
5,
]
states.remove (["red","green","blue"])
1 Answer
andren
28,558 PointsThere are two issues:
The first task asks you to remove the number 5 from the list, you are not doing that in your current code which is an issue since you need to keep the code from each task around in multi-task challenges like this.
The challenge checker can at times be pretty picky about how your code looks. It doesn't like the fact that you have a space between the
remove
method and its parenthesis, so you have to remove that space.
If you fix those two issues like this:
states = [
'ACTIVE',
['red', 'green', 'blue'],
'CANCELLED',
'FINISHED',
5,
]
states.remove(5)
states.remove(["red","green","blue"])
Then you will be able to pass the challenge.
Alistair Murphy
743 PointsAlistair Murphy
743 PointsThank you, yeah moments after posting this i adjusted the space and got it and the following :)