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 trialalan ingram
Courses Plus Student 3,979 PointsIs it me or the site?
I am doing workspace challenge and I have to remove the "5" from the list, then the next screen has me remove the list from within the list. However, the "5" I just got done removing is still there and now my code crashes because the "5" is still there. I passed one screen and now failing the next, based on a challenge I already completed. Was there something else I was supposed to do? states = [ 'ACTIVE', ['red', 'green', 'blue'], 'CANCELLED', 'FINISHED', 5, ] states.remove(['red', 'green', 'blue'])
5 Answers
alan ingram
Courses Plus Student 3,979 PointsI figured it out, I had to make a ink and paper list myself and through process of elimination wrote each option I tried that failed. For some reason I never thought you had to reference the entire list inside the function to delete it. but as soon as I tried, "remove([list items1, list items2, ..])", it deleted. Maybe we can go back to doing computing on stone tablets or paper.
Alexander Davison
65,469 PointsYou replaced the code you've written in the previous task, but you aren't supposed to remove the work you did.
Put in your code you wrote in the previous task and it should pass.
james south
Front End Web Development Techdegree Graduate 33,271 Pointsdid you replace the line where you removed the 5, or did you leave it and write a new line below it for task 2? the challenges state that you should leave the code from each task in place when doing subsequent tasks.
alan ingram
Courses Plus Student 3,979 PointsI left everything as is. The directions did not indicate that I should make a new line or print anything out. So when you go to the next page, the 5 is still there - eventhough it was correctly removed in the previous screen.
Savanna Sullivan
924 PointsI defined the list to be removed as a variable, then removed it using states.remove(list) Hope this helps :)