Use the "input" function.
you can do it like this:
#python start
print("Hello, World!")
input("Press Enter to exit:")
#python end
that way you can press enter to exit