Friday, October 24, 2008

Python notes : input

In python, the easiest way to get an input is by using:
The difference between the two is that input will interpret what you have input while raw_input will just record faithfully whatever you have typed in including backspace.
For example, when you type three symbols "H", input method will return H while raw_input will return "H"

Hello world program for python input:
test_str = input("input some thing")
print test
test_str2 = raw_input("input some thing raw")
print test_str2

1 comment:

Anonymous said...

but if I'm running a text pad tkinter
when I press H I want to type G for example