Python Input

Mostly all programs have some input fields where they require information to be filled by users.
Every software and website contains input fields.

Like Google search, where you input your query in box and google provide results after hitting enter.
Same in facebook form where you need to write email and password which is input field. So everywhere input fields are important.

We will use input in python so that user enter in fields and program provide output accordingly.

For input in python,


>>>x=input()


Here, value entered by user is stored in x variable.

We can also provide text in input to let user know what to enter. Let see how,

>>>x=input("Enter Number : ")
Enter number : 5

Add two numbers in python using input()

Back To Top