0

I'm trying to find a way to say Press any key to continue, and the user can press any key on their keyboard to continue the program. I'm currently using input("Press Enter to continue"), but this is not optimal for my project.

How can I make Python wait for any key to be pressed?

silvncr
  • 35
  • 7
  • 1
    what have you tried so far? are you creating some graphical instance? what operating system(s) are you targeting? – ti7 Sep 07 '21 at 06:28
  • I'm using Python 3.6 for Windows 10, and at the moment I'm making a simple menu interface. I'm very new to Python. – silvncr Sep 07 '21 at 06:33

1 Answers1

0

can you try this

import msvcrt as msv
def wait():
    msv.getch()
Dunggeon
  • 92
  • 1
  • 1
  • 11