Bootstrap FreeKB - Python (Scripting) - Prompt a user for input (stdin)
Python (Scripting) - Prompt a user for input (stdin)

Updated:   |  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 Buy Me A Coffee



Comments


Add a Comment


Please enter 55921b in the box below so that we can be sure you are a human.