# Python, Accepting Input

> Learn how to accept user input in a Python command line app with the input() function, which pauses execution until the user types and presses enter.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-12-06 | Topics: [Python](https://flaviocopes.com/tags/python/) | Canonical: https://flaviocopes.com/python-accept-input/

In a [Python](https://flaviocopes.com/python-introduction/) command line application you can display information to the user using the `print()` function:

```python
name = "Roger"
print(name)
```

We can also accept input from the user, using `input()`:

```python
print('What is your age?')
age = input()
print('Your age is ' + age)
```

This approach gets input at runtime, meaning the program will stop execution and will wait until the user types something and presses the `enter` key.

You can also do more complex input processing and accept input at program invocation time, and we'll see how to do that later on.

This works for command line applications. Other kinds of applications will need a different way of accepting input.
