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 trialGang Liu
519 Points1/2 code does not work
my coding does not work with the following format.
messay = [5, 2, 8, 1, 3] del messay [2]
messay = [5, 2, 8, 1, 3]
del messay [2]
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! There are a couple of problems here. First, you've changed the name of the list from messy
to messay
. You should start by reverting back to the name that the challenge specifies, Secondly, there may not be a space between the name of the list and the index of the list.
# This format will work
del myList[0]
# This format will not work
del myList [0] #note the additional space here
Hope this helps!
Gang Liu
519 Pointsya, you are right for both. Thanks!!
Jose Aguirre
14,866 PointsJose Aguirre
14,866 PointsAre you getting error, Did you use
del
?It is most likely because you've changed the list's name messy to messay. Too, there is a space between messay and [2] which you can omit.
Try
Let me know if this helped you out, or otherwise.