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 trialLisa Miller
680 PointsWhy 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!!
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHi Lisa,
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. :)
Lisa Miller
680 PointsLisa Miller
680 PointsMakes sense! Thank you Jason!!