Ask coding questions

← Back to all posts
I need help slowing down a python loop
ia13ru

Hi,
I am makin this game. I want to slow down the 'for i in range(3) ' loop in ' if key==""'. How do I do this?

Voters
ia13ru
Comments
hotnewtop
Coder100

you could use time.sleep to make it wait.
don't forget to also add import time

ia13ru

@Coder100 Where? I am also using tkinter

Saml2020

@ia13ru time.sleep() Pauses the whole program. So if you want to slow down a loop, put it at the end or start inside of the loop.

Coder100

inside the loop!

@ia13ru

ruiwenge2

you can use this:

You can change the 1 to however many seconds you would like.

ch1ck3n

Can you be more descriptive