Home >>Python Built-in Functions >Python input() Function
Python input() function is used to get the input from the user. It allows the user to give an input to the program.
Syntax:input(prompt)
Parameter | Description |
---|---|
prompt | This parameter defines a String, representing a default message before the input. |
print("Enter your name:")
x = input()
print("Hello, " + x)
x = input("Enter your name:")
print("Hello, " + x)