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
Unsubscribed User
2,115 Pointswhile True:
Why did we add a ("> ") to the input?
while True: new_item = input("> ")
2 Answers
karis hutcheson
7,036 PointsThe argument you pass into the input method is a prompt string. Such as:
input("Type your input: ")
Would show up as:
Type your input:
On the command line where the user would then type something after the prompt. He had you type input("> ") only to denote to the user that this is where you'll be entering your input.
Unsubscribed User
2,115 PointsThanks I knew input() gave a prompt. But, I guess I should've ran this in CMD because in the shell there's integrated >>> which gave the illusion that nothing was being added when there was code saying new_item = input("> ")