Press any key to exit...
You want to paste a code that ends after you receive a keyboard input (whatever) at the end of the program.
In C, we could have gotten a character type through scanf If I use input(), I have to type in enter. Is there any other way?
input ("Press any key to exit...") #Exit only when you press Enter
The msvcrt module allows you to write visual C/C++ runtime library functions.
import msvcrt as m
def wait():
m.getch()
There are no standard libraries available separately on Linux, etc.
There is.
© 2024 OneMinuteCode. All rights reserved.