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()

Paul Nam
Paul Nam
2,093 Points

can't remove correctly, please help

states = [['red' 'green' 'blue']

[ 'ACTIVE', ['red'append(1), 'green'.append(2), 'blue'.append(3), 'CANCELLED'.append(4`, 'FINISHED' .append(5), 5.append(6) append.remove(6) ]

lists.py
states = [['red' 'green' 'blue']

[
    'ACTIVE',
    ['red'append(1), 'green'.append(2), 'blue'.append(3),
    'CANCELLED'.append(4`,
    'FINISHED' .append(5),
        5.append(6)
                       append.remove(6)
                       ]

It seems you aren't understanding lists. It would probably be best to re-watch the videos and listen carefully :)

Umesh Ravji
Umesh Ravji
42,386 Points

Just to add to the comment above.

You have the list given to you, don't touch these lines of code, only add your own. You call methods on that list such as append using states.append('apple') which will add an item to the list.

fruits = ['Banana', 'Mango', 'Pear']
fruits.append('Apple')  # add 'Apple' item to end of list
fruits.remove('Mango')  # remove 'Mango' item from list