[Solved] What does >>> do in python


When you see people’s code online, you may see >>> before their code because they ran through it in the terminal. For example:

>>> print "Hello, World!"
Hello, World!
>>> 

This is code they typed into the python terminal. That means they haven’t saved their code to a file.

In the terminal, the arrows appear whenever the computer is ready to receive a new command. As long as it’s still running the last entry, the arrows won’t pop up. That’s why, in the example above, there are no arrows before line 2, where the computer printed “Hello, World!”. Then, as soon as it finished running, the terminal typed the arrows again, prompting the user to enter another command.

1

solved What does >>> do in python