How to enter input automatically in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to enter input automatically in python?

I need to have a user press one key and it enter automatically. Is there a good library for this or if you have the code lmk

16th Sep 2018, 6:01 AM
Jonathan Wodzisz
Jonathan Wodzisz - avatar
1 Answer
+ 1
As far as i understand, you need a readkey functionality. Try out msvcrt module and its getch method.
16th Sep 2018, 8:12 PM
strawdog
strawdog - avatar