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)
![Andy McDonald](https://secure.gravatar.com/avatar/2c7a70bb997cb62e77a9341481bf2b27?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy McDonald
Python Development Techdegree Graduate 13,801 Pointsindex given to .pop() is not removing correct list entry
If i put the pop index at 0 it takes the index position of 1. I don't understand why its doing this
def pop(yolist, indexx):
newnew = yolist.pop(yolist[indexx])
return yolist
![Haben Gebremeskel](https://uploads.teamtreehouse.com/production/profile-photos/11656418/micro_IMG_7340_Low_Resolution.jpg)
Haben Gebremeskel
Python Development Techdegree Student 4,569 PointsNo problem!
def pop(yolist, indexx):
newnew = yolist.pop(indexx)
return yolist
![Andy McDonald](https://secure.gravatar.com/avatar/2c7a70bb997cb62e77a9341481bf2b27?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy McDonald
Python Development Techdegree Graduate 13,801 PointsSo Haben.. your adding comments to the question. If you scroll down further there will be a button that says post answer or something to that effect. If you click that, and then answer. I can select it as best answer and then you can get discussion points.
1 Answer
![Haben Gebremeskel](https://uploads.teamtreehouse.com/production/profile-photos/11656418/micro_IMG_7340_Low_Resolution.jpg)
Haben Gebremeskel
Python Development Techdegree Student 4,569 PointsHi Andy! You are very close, the reason you're getting this problem is when your using yolist[indexx] it is giving you the VALUE of yolist[indexx] NOT THE ACTUAL --->INDEX NUMBER<---. You can easily fix this by replacing yolist[indexx] with just indexx.
![Chris Freeman](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsChanged comment to answer. Marked as best answer.
Andy McDonald
Python Development Techdegree Graduate 13,801 PointsAndy McDonald
Python Development Techdegree Graduate 13,801 PointsPlease copy and paste into answer question section so i can mark your response as best answer!