Input and Output in Python — a practical guide to Python input output with clear examples you can reuse in real projects.
Python Tutorial Series (11/95). Prefer one article? Read the complete Python tutorial.
Short description
`input()` returns a string. Convert it before doing math. Prefer f-strings for readable output.
I/O example
name = input('Your name: ')
age = int(input('Your age: '))
print(f'Hello {name}, next year you will be {age + 1}')