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

Dillon Edwards
Dillon Edwards
902 Points

states.remove(['red','green','blue']) does not seem to work. What am I missing in the second part of this question?

I actually verified this by remaking it in the console workspace simulator and was able to do what the question asked. I also referenced 7:21 in the Lists video with Kenneth Love. I am not sure if I am going crazy, or if I am missing something very obvious, but I tried recreating it in the console and did not have this problem.

lists.py
states = [
    'ACTIVE',
    ['red', 'green', 'blue'],
    'CANCELLED',
    'FINISHED',
    5,
]
states.remove(['red','green','blue'])

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 143,922 Points

Hi Dillon,

It looks like you're missing the code from Task One. Without that, the code checker cannot properly check your code, and that is why you are receiving the Bummer.

Challenges are very specific and must always have the instructions followed exactly. Unless it tells you to remove or change some code... don't. :smirk:
If a challenge has more than one task, the code always just builds. So, for this one, there should be two lines that have states.remove(....).

Otherwise, nice work! :) :dizzy: