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

Python Python Collections (Retired) Lists Redux Removing Items From A List

Why does same command gives (and NO give) error on execution?

Strange that during video an error seem to be popped up but then nothing is mentioned about it and when tried later on seem to work just fine.

This is what I'm referring to: http://mydevhost.net/WhyErrorNoError.png

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Hmm, that's a good question. I've recorded 7 other courses since then, so forgive me if the details slip my mind. My best guess is that it's a typo caused by our Workspaces terminal sometimes not showing all of the characters when you back up over a line.

I bet I ended up, accidentally, typing something like a_list.index('z')(), which would cause Python to try and call the index, an integer, as a function.

Well, thank you. I was just curious since it wasn't mentioned during the time that it happened and I really work hard to see it right to make sure it was written exactly as the second one (trying to learn what could actually caused the error or what does it means) but seem that both lines were identical so I though asking would be part of the learning experience. Anyway, thanks for your prompted response and Merry Christmas to you :)