Skip to content
I need help slowing down a python loop
Profile icon
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?

You are viewing a single comment. View All
Profile icon
Coder100

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

Profile icon
ia13ru

@Coder100 Where? I am also using tkinter

Profile icon
SamDev7

@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.

Profile icon
Coder100

inside the loop!

while ...: ... time.sleep(1)

@ia13ru