How can I use the "press Enter to continue" function in python?

I am writing a game "choose your own adventure style" 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") 

press enter to continue. Then, after pressing the enter button, this block will work.

 print("yyyyyy") 

Python 3 is preferred.

+5
source share
1 answer

Python 2:

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

Python 3:

 input("Press Enter to continue...") 
+10
source

Source: https://habr.com/ru/post/1263894/


All Articles