On this page
  1. input
  2. Import & Availability
  3. Overview & Signature
  4. Usage
  5. Gotchas
  6. REPL Inspect

input

Prev: id | Up: __builtins__ | Next: int
Rel: breakpoint, compile, eval, exec, globals
Ref: docs.python.org — input
Tags: #public #python3 #builtins


Import & Availability

# Built-in (available globally without import)
from builtins import input

Overview & Signature

input(prompt='', /)

Read a string from standard input. The trailing newline is stripped.

Usage

# Reads one line from sys.stdin as a str (trailing newline stripped):
# name = input("Name: ")
assert callable(input)

Gotchas

REPL Inspect

help(input)

Linked from

Related notes