How To Pause Or Sleep A Python Program
input, pause (WIN-only) and sleep
Mar 28, 2022
1. INPUT
input("Press Enter to continue...:")
2. WINDOWS — PAUSE
- Possible, but go with 1
import os
os.system("pause")
3. SLEEP
- No user input necessary, putting to sleep
import time
sleep_seconds = 10
time.sleep(sleep_seconds) # Pause 10 seconds
- Don’t forget to put seconds as units if using sleep