What I'm trying to do is add a delay of 0.5 seconds everytime it prints something. But the problem I have is that it lags for a while and then prints it all at once.
import time
x = [(0, 1), (2, 3), (4, 5), (6, 7), (8, 7)]
for i in x:
print(i)
time.sleep(0.5)
what this should do:
(0, 1)
wait 0.5 seconds
(2, 3)
wait 0.5 seconds
(4, 5)
etc
however the problem with mine is that it doesnt print the first one and wait 0.5 and print the next, what mine does is it waits for so long and then prints all at once, I was wondering what's a way to fix this.