input()

Built-in FunctionPython 2.0+Beginner

Reads a line of text from the user via the console

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
# input() reads user input (not available in Pyodide)
# name = input("Enter your name: ")
# print(f"Hello, {name}!")
print("input() reads a line of text from the user")

input() is a built-in function that reads a line of text from the user via the console.

Try in Playground

Tags

builtinfunctioncoreiointeractivestring

Related Items