Python input() function

Published February 16, 2022

Web applications frequently need to interact with users to obtain data or produce the desired output. A dialog box is the most common method of requesting user input in today's programs. In Python programs, we use the input() function.
The input() method in Python is used to receive user input. The input function transforms whatever you provide as input into a string. The input() function takes an integer value and turns it into a string.

Syntax
The following is the syntax for the input() method

input(Message to prompt user input data)


Example

Consider the following example: We'll type in our favourite programming language and print it out.

Programming_Language = input("Enter your favourite programming language")
print("I Love," Programming_Language)

Output

Python input() function

 

 

Download Source code

 

Article Contributed By :
https://www.rrtutors.com/site_assets/profile/assets/img/avataaars.svg

239 Views