Raw_Input and Input
There are two functions in Python that you can use to read data from the user: raw_input and input. You can store the results from them into a variable.
Raw_Input
raw_input is used to read text (strings) from the user: name = raw_input("What is your name? ") type(name) >>output What is your name? spilcm type 'str'>
- How To Use sys.arv in Python
- Python for Android: Using Webviews (SL4A)
- Python Programming – File Processing
Input
input is used to read integers age = input("What is your age? ") print "Your age is: ", age type(age) >>output What is your age? 100 Your age is: 100 type 'int'>