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

Python Python Basics (Retired) Shopping List Shopping List Project

Kate Petry
PLUS
Kate Petry
Courses Plus Student 9,432 Points

Why was the new_item variable set to input(">")?

I understand why we use input because we are asking for something from the user but why is this used: ">" ? Could we have put anything there are is there some special meaning to the >?

2 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

You're correct, there's no need to use ">" there if you don't want to, you can put whatever you like "!", "?", anything. The reason Kenneth use ">" is in the unix's terminal world, ">" is often used as convention to indicate asking user input, but ">" has no special magical meaning.

William Li
William Li
Courses Plus Student 26,868 Points

Oops, typo, I've finished all Python courses, and been taking some Rails courses taught by Jason lately, must have typed his name by mistake, sorry about that Kenneth. typo has been corrected.