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 trialGeorge Lugo
Python Web Development Techdegree Student 922 Pointswhat is wrong with my code
best = ["chicken", "johnson", "able"] best.extend(["yams","corn"]) best.insert(["start"],[0])
best = ["chicken", "johnson", "able"]
best.extend(["yams","corn"])
best.insert(["start"],[0])
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi George,
You're pretty close,
You have the arguments to insert()
in the wrong order. It should be the index first, and then the value you want to insert.
Also, the index is a simple integer and should not have brackets around it.
And you want to insert the string "start"
, not the list ["start"]
. So the brackets have to be removed there as well.
Let me know if you're still stuck.