10

I am writing a choose-your-own-adventure style game in python (terminal based) and I would like the program to pause printing until the enter button is pressed. Here is an example.

print("zzzzzzzzz")

the press enter to continue would come here. Then, after they press enter, this block would run.

print("yyyyyy")

Python 3 is preferable.

Pranav A.
  • 320
  • 1
  • 4
  • 17

1 Answers1

16

Python 2:

raw_input("Press Enter to continue...")

Python 3:

input("Press Enter to continue...")
Z. Danev
  • 11,848
  • 1
  • 29
  • 48