Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
215,959 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'])