Built-in Functions
input()
Read a line of text typed by a user.
input(prompt="")
Use the pattern name = input("Name: ") when a program needs typed input. The function returns text, so convert it with int() or float() when you need a number.
The example uses a saved value instead of calling input(), so it runs without waiting for typing.
Parameters
| Name | Description |
|---|---|
| prompt | Optional text shown before the user types. |
Returns
The entered text as a string, without its ending newline.
Try it
Run it and change it
entered_name = "Ada"
print(f"Hello, {entered_name}")