Lecture # 8 - Accepting User Input
Abdullah Bin Altaf
1 min read
Table of contents
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:
0
Subscribe to my newsletter
Read articles from Abdullah Bin Altaf directly inside your inbox. Subscribe to the newsletter, and don't miss out.
DevopsPythonPython 3python beginnerpython projectspython librariesProgramming BlogsProgramming Tipsprogramming languagesprogrammingInput
Written by