Chapters
Python114 chapters

ReferenceBuilt-in functions

input()

Waits for a line to be typed and hands it back as text.

Signature

input(prompt='')

Parameters

NameMeans
promptshown before waiting

Returns

A str, always. Convert it yourself for arithmetic.

Example

Python
typed = "25"
print(type(typed).__name__)
print(int(typed) + 10)

Output

str
35

See also