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

Cameron Robinson
PLUS
Cameron Robinson
Courses Plus Student 605 Points

List.remove question

okay so I cleaned up the code to status = (['blah', 'blah', 'blah', 'something', ['to something', 'this works on workspaces', '5']] than I try and remove the last part of the list like this status.remove(['to something', 'this works on workspaces', '5']) but it keeps giving me an error no matter how I arrange it also as in my code where I forgot all of the listings I tried it on workspaces and it worked perfectly someone please help I want to complete the challenge.

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

1 Answer

Aaron Nolan
Aaron Nolan
5,714 Points

Hey Cameron,

Just a simple overlooked error that you'll probbly be kicking yourself once you realise! The list is called 'states' but you are calling it 'status' when you are trying to remove the 5! Hope this helps! :)

Cameron Robinson
Cameron Robinson
Courses Plus Student 605 Points

Holy crap you're right I am kicking my self about it, that is such a easy fix thanks helped a ton.