User Input: Difference between revisions
Appearance
Created page with "== Using input() == <syntaxhighlight lang="python" line> secret = input("Tell me a secret. I promise I won't repeat it: ") print(f"Your secret was '{secret}'. Oops, sorry!") </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight>" |
No edit summary |
||
Line 19: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Python]] |
Latest revision as of 17:51, 16 February 2025
Using input()
secret = input("Tell me a secret. I promise I won't repeat it: ")
print(f"Your secret was '{secret}'. Oops, sorry!")