Skip to content
← Back to Community
How to Add Wait
Profile icon
LilWolfy

Hi fellow Repl-ers!

I just wondered how to add a command in Python for a wait.
For example, the code prints something, then has a two second wait.

Please let me know if you know how.

First person who lets me know gets +5 cycles.

Answered by InvisibleOne [earned 5 cycles]
View Answer
Voters
Profile icon
LilWolfy
Comments
hotnewtop
Profile icon
InvisibleOne

Just import time and then do time.sleep(time)

import time print("Hello") time.sleep(1) # will pause for one second print("Hello")
Profile icon
LilWolfy

@InvisibleOne Thank you!