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 trialTadeáš Firich
7,866 PointsWhy my code doesn't work? :)
Hello dear team treehouse community I have tried to solve my problem but it does not work and i don't know why .
best = ['My','name','is']
best.extend(['Super','Man'])
best.insert(["start"])
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! I received your request for assistance. You're doing great and made it through the first two steps with no problems. The problem lies on the final line. The insert
method takes exactly 2 arguments. You've told it what to insert, but not where to insert it. Also, you've told it to insert a list containing one string element. But what we want to insert is simply a string. Take a look:
best.insert(0,"start")
This will insert the string "start" at the 0 index of the best
list. Remember, that indexes start counting from 0.
Hope this helps!
Tadeáš Firich
7,866 PointsTadeáš Firich
7,866 PointsThank you very much Jennifer.