import msvcrt

def any_key_message(message):
    for char in message:
        char = char.encode('utf8')
        msvcrt.putch(char)
    msvcrt.getch()
    msvcrt.putch(b"\n")

any_key_message("Press any key to continue...")
any_key_message("Press any key to exit...")
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.