input() function is very simple and straightforward. It allows getting user’s input in string format. This is how it works:
1-) Type your message inside input(), this will be displayed to the user.
2-) And user will be shown a message or asked a question accordingly.
3-) After that, whatever they enter will be the value of your variable.
Let’s see some examples: