Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Lisa Miller680 Points
Why was a greater than sign used here? new_item = input ("> ")
This is in shopping list app. Could you leave it blank as well? Thank you!!
Jason AndersTreehouse Moderator 145,728 Points
Here it's actually not being used as a "greater than" symbol, but rather just a symbol to denote a prompt. It makes a bit more sense in context and if you are using it at the end of a sentence. Here would be two examples, first without and second with it.
Enter an item please Enter an item please > You could do it to you own aesthetic pleasings... Enter an item please ==>
So, yes it could be left off, but it is good to have something like that when building console-based programs. On a website, you style an input box so the input needed is obvious. But in the console, having a > or : or ==> just adds that bit of clarity that the program is expecting the user to now input something.
Hope that makes sense. :)