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 trialTruxton Stevens
28,536 Pointsdel messy [2] not working?
The task is to delete the 8 from the list
When I copy and paste the code into IDLE or the python shell, it works just fine, and the '8' is deleted as the task requires. But the quiz refuses to accept the answer! What am I missing here? Thanks for any pointers
messy = [5, 2, 8, 1, 3]
del messy [2]
1 Answer
crosscheckking
25,155 PointsYou have a space between messy and [2].
messy = [5, 2, 8, 1, 3]
del messy[2]
Truxton Stevens
28,536 PointsTruxton Stevens
28,536 PointsThanks, that was ridiculously easy after you pointed that out. Spent 15 minutes driving myself crazy with it. Cheers!
crosscheckking
25,155 Pointscrosscheckking
25,155 PointsYou're welcome. Hard to catch the small mistakes sometimes. Especially when it's a space rather than a typo that's easier to see. Happy coding!