Skip to content
masterclass Buddy

Python · Function

input

input() optionally shows a prompt, reads one line from standard input, and returns it as a string without the trailing newline.

Last updated

Syntax

input()\ninput(prompt, /)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • print
  • EOFError
  • readline

Source: Built-in functions — Python 3.15.2 documentation. Checked 2026-11-03.