← back to unit
Easy
# basics io
Reading What the User Types
input() pauses your program and waits for the person using it to type something and press Enter. Whatever they typed comes back as the answer — save it in a variable (a labeled box) so you can use it later:
name = input()
print(name)
If the user types Sam, this prints: Sam
Your turn: read a line of input and print it back out, exactly as it was typed.
💡 need a hint?
pyb-io-first-input.py
loading...