In python, the easiest way to get an input is by using:
input
raw_input
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
"
Friday, October 24, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
but if I'm running a text pad tkinter
when I press H I want to type G for example
Post a Comment