The input() function in Python is used to allow a user to enter input data into the program. Once the statement containing the input function is encountered, the program pauses to wait for the user to enter something.

Syntax:

input(prompt)

Where the prompt is an optional statement or query for the user that will appear on the screen. 

Example:

input('Enter your name:')
//Enter your name: John_
//'John'

We can assign the value entered by the user to a variable, this value is always received as a string but we can cast it to other type if necessary. Examples:

name = input('Enter your name:')
//Enter your name: John Doe _
age = input('Enter your age:')
//Enter your age: 20 _
print('%s, %s'%(name, int(age)))
//John Doe, 20
nums = input("Enter comma separated values:")
//Enter comma separated values: Python, Java, PHP, C++ _
L = nums.split(',')
print(L)
//['Python', 'Java', 'PHP', 'C++']