1

Is there a Python 3 module that allows to input a single character, without having to press Enter afterwards?

Like Bash's read -n1 var?

0

There is a module named getch, but it is not intsalled by default. To install it, use pip3 install getch --user.

you can use it this way :

import getch
c = getch.getche()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.