You are here : python_3Built-in Functionsinput

input() - Built-in Functions

If the prompt argument is present, it is written to standard output without
a trailing newline.  The function then reads a line from input, converts it
to a string (stripping a trailing newline), and returns that.  When EOF is
read, EOFError is raised.  Example:


Syntax

input([prompt])


Example

>>> s = input('--> ')  
--> Monty Python's Flying Circus
>>> s  
"Monty Python's Flying Circus"


Output / Return Value


Limitations


Alternatives / See Also


Reference