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

Cannot see how many items there are in the list

I don´t receive the message with how many items I have until I write done, and when I write it I receive always 1 item, this is my code: https://w.trhou.se/c7zbrl9d9h

2 Answers

Steven Parker
Steven Parker
243,266 Points

Since line 31 is not indented, Python considers it to be after and outside of the loop. So the call to "add_to_list" is only executed after you type "DONE" to end the loop, and then only one time.

Anything other than "DONE" or "HELP" that is entered within the loop is currently ignored.

thanks