We can prompt our users for input with Python's built-in input function.

Table of contents
Prompting for user input
Python has a built-in input function that we can use to prompt a user of our program to enter some text:
>>> color=input("Favorite color:")Favorite color:▯Our Python REPL is now hanging and waiting for us (the user) to input text.
Let's type purple:
>>> color=input("Favorite color:")Favorite color:purple▯After the user has typed the text they'd like to enter, they can hit the Enter key to lock-in the value.
>>> color=input("Favorite color:")Favorite color:purple>>>Now the color variable contains the string purple:
>>> color'purple'Customizing the prompt text
Note that the input function …