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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Igor Dias](https://secure.gravatar.com/avatar/16d3b6377da91f573e0b312d03e753e1?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Igor Dias
5,155 PointsProblem adding an iten in the end of the list using insert
names = ["john","bill","gabriel"] numbers.insert(-1, "Ana")
Why this does not work?
3 Answers
![Tabatha Trahan](https://secure.gravatar.com/avatar/8fb520c58abcb20923a4a491666294a7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Tabatha Trahan
21,422 PointsIt looks like you may just have called the insert method on the wrong variable name. You declared a list of values called name, but you called the insert method on a list with the name of numbers.
![Vincient Degala](https://uploads.teamtreehouse.com/production/profile-photos/9670522/micro_12106897_1254324454593067_514726389613176548_n.jpg)
Vincient Degala
1,616 Pointsnames = ["john", "bill", "gabriel"] names.insert(-1, "Ana")
try this
![Nick Evershed](https://secure.gravatar.com/avatar/70eace01ff439a9753b5e7c54cf1bee6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nick Evershed
6,429 PointsYou called the insert function on an undefined variable called number, probably because you indexed and got confused