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!
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

Eric S
7,991 PointsPublic Service Announcement
When run on OS X v10.10 with Python v2.7.6, I get:
Traceback (most recent call last): File "shopping_list.py", line 19, in <module> new_item = input("> ") File "<string>", line 1, in <module> NameError: name 'Apples' is not defined
The same code passes in the Treehouse Workspace, which uses Python v3.4. I've read there were big changes from 2.x to 3.x but don't know enough as to why this happens.
No biggie, but I spent a few minutes on it so I though I'd pass it along.
1 Answer

shezazr
8,275 Pointsitem = input("> ") is a python 3 syntax
use raw_input instead!
Eric S
7,991 PointsEric S
7,991 PointsThat explains it. Thanks!