Python Input
Python input is a built-in function to give the arguments to the program.
for example: You are writing a program of addition of two number so you have to take input from the user. Here, You have to use input statements to take input from the user.
input("Enter the number:")
Output: Enter the number:
Syntax
input("string")
- string: It is print on the screen when python asks the user for input. It is optional field and default is ''.
Python stops executing when it comes to the input() function and continues when the user has given some input.
More Sample Codes
input("Enter your choice")
Output: Enter the choice: