Syntax
The syntax is as follows for Python v2.x:
mydata=raw_input('Prompt :')
print(mydata)
On Python v2.x:
raw_input is used to read text (strings) from the user.
input is used to read integers.
The syntax is as follows for Python v3.x as raw_input() was renamed to input() :
mydata=input('Prompt :')
print(mydata)
网友评论