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

Aleksandar Jovanovic
Aleksandar Jovanovic
949 Points

It looks like Task1 is no longer passing

no clue what's wrong here

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

2 Answers

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,145 Points

Hi there,

Your code is working for me, even with the additional print statement. Probably best reset the challenge and start again.

Steve.

Aleksandar Jovanovic
Aleksandar Jovanovic
949 Points

I've also tried resetting the challenge, but it didn't work, so I skipped it.

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,145 Points

I found the answer. You have indented the closing square bracket. If you unindent that, your code is fine.

states = [
    'ACTIVE',
    ['red', 'green', 'blue'],
    'CANCELLED',
    'FINISHED',
    5,
] # don't indent this

Steve.