in python , could I accomplish the purpose that "a=Console.read()" used in C?
Dennis Benzinger
Dennis.Benzinger at gmx.net
Sun Jun 4 11:07:18 EDT 2006
python wrote:
> in python , could I accomplish the purpose that "a=Console.read()" used
> in C?
> when program is running, I wanna add a statement like
> "a=Console.read()" in C language,it will wait for user's input, after
> user's typing a character , and click "enter" key, the program will go
> on running.
>
Use raw_input() <http://docs.python.org/lib/built-in-funcs.html>:
age = raw_input("Your age: ")
print age
Bye,
Dennis
More information about the Python-list
mailing list