Need a function. Any built-in function or module for this?

wcc wccppp at gmail.com
Sat Oct 14 20:38:44 EDT 2006


Hello group,

I need to write a function to get input from user. The prompt will be
like this:
Specify direction[Left/Right/Up/Down] or <Left>:

And if user type "L" or <ENTER>, the function will return "Left", if
user type "R", the function will return "Right", etc..

My quick search in python reference did not yield valid result. Any
pointer?

Thanks for your help.

-wcc




More information about the Python-list mailing list