get just one character
mde at micah.elliott.name
Thu Nov 17 19:27:38 CET 2005
On Nov 17, Sinan Nalkaya wrote:
> how can i just get 1 character ? i`ve done a search but just found
> getch() for windows, i need same for unix and raw_input has any
> option that is not documented ?
Get all the characters one at a time:
>>> inp = raw_input('enter a string> ')
enter a string> this is a string
>>> for ch in inp: print ch
Or just get a single character:
_ _ ___
|V|icah |- lliott <>< mde at micah.elliott.name
" " """
More information about the Python-list