User Program Communication

User Input in Python

User input is used to get information from the user during runtime.


Syntax
variable = input('Prompt message: ')

Notes

Input is always taken in as a string.


Example
name = input("What is your name: ")
print ("Hello, {}!".format(name))

< Print   |   Commenting >

© 2018 SyntaxDB. All Rights Reserved.