Skip to main content

Command Palette

Search for a command to run...

Lecture # 8 - Accepting User Input

Accepting User Input in Python.

Published
1 min read
Lecture # 8 - Accepting User Input

Accepting User Input:

Accepting user input in Python is quite straightforward. You can use the input() function to prompt the user for input.

Syntax:

input("Input Something: ")

Output:

Example:

day = input("What day is today?")
print("Today is", day)

In the above code the variable day will store the day of the week that the user enters.

Output: