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 trialPaul Nam
2,093 Pointscan'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) ]
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)
]
Umesh Ravji
42,386 PointsJust 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
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsIt seems you aren't understanding lists. It would probably be best to re-watch the videos and listen carefully :)