How can I slow down a loop in Python? -
if have list l:
l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
is there way control following for loop next element in list printed 1 second after previous?
for in l: print
in other words, there way elegantly slow down loop in python?
you can use time.sleep
import time in l: print time.sleep(1)
Comments
Post a Comment