input : Reads a number from user input.You can assign (store) the result of input into a variable.
Example:
age = input("How old are you? ")
print type(age)
print "Your age is", age
print "You have", 65 - age, "years until retirement"
raw_input : Reads a string of text from user input.
name = raw_input("What's yer name? ")
print name, "... what a silly name!"
Output: Howdy, pardner. What's yer name? Paris Hilton
Paris Hilton ... what a silly name!
1 Comment(s)