SimpleTuts.com

Python User Input

User input in Python is obtained using the input() function, which prompts the user to enter data and returns it as a string.


#Read data from user

name = input("Enter your name: ")
place = input("Enter your place: ")
age = input("Enter your age: ")

print("Hello I am",name,"from",place,"and I am",age,"years old")
                
Python Online Compiler