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
Christopher Johnson
12,829 PointsWhat does ('> ') mean in python?
I have seen this used multiple times with input during the python tutorials and I cannot remember or find where it was introduced. What does this mean?
new_item = input('> ')
Just the input('> ') part.
Thanks for the help!
2 Answers
Kenneth Love
Treehouse Guest Teacherinput() is a function in Python that gets user input (if you're writing Python 2, you'll want to use raw_input() instead). The string argument inside of the function is the prompt to show to the user. I've been using '> ' because it's simple and not completely unfamiliar to most people. Feel free use whatever prompt text you want.
Christopher Johnson
12,829 PointsOh I understand. It makes sense why you would use that, but I thought it might have some weird rule for it's existence. Thanks!