Python (Scripting) - Prompt a user for input (stdin)
by
Jeremy Canfield |
Updated: March 19 2024
| Python (Scripting) articles
Let's say you want to prompt a user for input, like this.
What is your name?
The following markup can be used to produce the prompt.
#!/usr/bin/python
name = input("What is your name?")
print(f"name = {name}")
Did you find this article helpful?
If so, consider buying me a coffee over at