Get input from user in Python

In python, input function can be used to get the input data from user. By default, input box is displayed when executed in jupyter console and line prompting to enter the data is displayed in console. input returns the data in string format, type casting is required if data has to be converted to float or int.

Example : Get input from user in python


name = input("Enter your name: ")
print("User entered "+name)

Input Prompt
Enter your name: Forgetter

Output
User entered Forgetter