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 trialmima šiš
Courses Plus Student 268 PointsNot allowed to think differently
The task asks me to delete 8 from messy = [5, 2, 8, 1, 3] and I couldn't do del messy[-3]. The task is really limited, because it can only be solved by typing del messy[2]
messy = [5, 2, 8, 1, 3]
del messy[2]
1 Answer
Shane Robinson
7,324 PointsDid they cover deleting/adding using negative indexes? These challenges are purposely meant to be of a limited scope, that way it ensures that you are applying what you just learned instead of some other knowledge. If they didn't cover deleting/adding with using negative indexes it is understandable that it wouldn't be accepted.
If they did cover that, then it's odd that it isn't accepted. Might be a mistake in that case.