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 trial

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

Hi, For some reason the second task in Python Basics is not parsing.

Code: states = [ 'ACTIVE', ['red', 'green', 'blue'], 'CANCELLED', 'FINISHED', 5 ]

states.remove(['red', 'green', 'blue'])

Does not pass. I get "Oops! It looks like Task 1 is no longer parsing"

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

states.remove(['red', 'green', 'blue'])

2 Answers

Steven Parker
Steven Parker
231,236 Points

:point_right: You must leave your task 1 code and add to it.

When you have multiple-task challenges, each task builds on the work done in the previous task. So be sure to not remove the work you did previously as you perform the new task.

Vidhya Sagar
Vidhya Sagar
1,568 Points

You missed The code for task 1 or accidentally deleted it .

states.remove(5)
states.remove(['red', 'green', 'blue'])