Python Python Basics (2015) Python Data Types list.remove()

Johan Berg
Johan Berg
Pro Student 5,352 Points

"You should have used `.remove()` twice now." Odd error message appears for the Python list remove code challenge

I followed the instructions to the challenge, but despite this, I keep receiving an error message informing me that "You should have used .remove() twice now." I have no idea why this message appears, as there appears to be nothing wrong with my code. I even ran the code in PyCharm, where it performed the action that I wanted it to do.

So why then have I received this message?
states = [
    ['red', 'green', 'blue'],
states.remove(['red', 'green', 'blue'])

1 Answer

Jason Anders
Jason Anders
Treehouse Moderator 144,810 Points

Hey Johan,

Your code is correct. :thumbsup:

Now, I have no idea why this is causing the challenge to fail on Task 2, but if you delete those 3 commented lines you have there, both Task one and Task two does pass. Strange!?! :confused:

Maybe send the Support Team and email, and include the URL for this Post. You may earn a special Exterminator Badge for this bug.

Keep Coding! :) :dizzy: