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

Why have the \n>

I understand what \n does but don't understand why you would add the >

def remove_from_list():
    what_to_remove = input("What would you like to remove?\n> ")
    try:
        shopping.list.remove(what_to_remove)
    except ValueError:
        pass
    show_list()

1 Answer

Steven Parker
Steven Parker
229,644 Points

That's known as a "prompt symbol". It's a way to show the user that they are expected to type something on that line.

A single ">" character is a common convention that many users will recognize. In this case, it would probably work just as well to omit both the newline and the ">" symbol and leave the cursor sitting after the question.