Possible Duplicate:
Python read a single character from the user
I am using below code.But instead of accepting a single character its allowing user to put more than a single character.
How can I fix that?
guess = raw_input(':')
guessInLower = guess.lower()
The following will continuously prompt the user for input until they enter exactly one character.
This does the same, but also informs them of the one character limit before prompting again for input
It looks like you are expecting only letters. If that is the case you can expand this further to require that: