Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the three arrow (">>>") signs mean?

I haven't been able to figure out what the >>> does, even though I often see it often in source code.

like image 261
Dumle29 Avatar asked May 07 '13 13:05

Dumle29


People also ask

What does >>> mean in code?

'>>>' is the prompt of the interactive Python interpreter, meaning that the interpreter is ready to get Python statements typed in.

What does >>> indicate in Python?

That >>> is called a prompt, which means it's something the computer displays to tell you it's ready for your instructions. You can type things into that window, and the computer will obey them when it understands your commands.

What does 3 crossing arrows mean?

One arrow typically represents direction moving forward. Two arrows crossed represent friendship and or peace. Perhaps the three crossed arrow symbol represents moving forward with friendship or a long-lasting friendship.

What does a 3 arrow tattoo mean?

A three arrow tattoo can be a symbol of friendship. It is a great design to get with friends or loved ones. The ink is also thought to represent a strong bond.


2 Answers

You won't see it in source code, it's probably documentation. It indicates an interactive session, and things typed into the 'interpreter' are marked with this. Output is shown without the arrows.

In fact, the python documentation often has a button >>>at the top right of example code to be able to hide the arrows (and output) so that you can copy and paste the code.

Shown:
shown
Hidden:
hidden

like image 134
askewchan Avatar answered Oct 02 '22 15:10

askewchan


'>>>' is the prompt of the interactive Python interpreter, meaning that the interpreter is ready to get Python statements typed in. It's occuring quite often in examples within the documentation of a Python program, in order to show which commands can be used and what will be the result of giving these commands to the interactive interpreter. For example, in a documentation of the print statement, one could give this example:

>>> print "Hello world." Hello world. 

This would be an actual snippet of a session with the interactive Python interpreter.

An interesting feature in IPython is that it ignores leading >>>, meaning that you can copy and paste code from such documentation without needing to remove the leading >>>:

In [1]: >>> print "Hello world." Hello world. 

(The prompt in IPython is In [n]:, where n is counting the interactive commands issued.)

like image 45
silvado Avatar answered Oct 02 '22 16:10

silvado