8/28/26Less than 1 minuteAbout 67 words
Concept: The input() function
The input() function is used to get user input in Python. When called, it displays a prompt (if provided) and waits for the user to type something and press Enter. The input is then returned as a string.
user_input = input("Please enter your name: ")
print("Hello, " + user_input + "!")
# Output: Please enter your name: John
# Hello, John!