python repeat every n seconds

Solutions on MaxInterview for python repeat every n seconds by the best coders in the world

showing results for - "python repeat every n seconds"
Allison
20 Mar 2016
1#executes printit() every 5s
2import threading
3def printit():
4  threading.Timer(5.0, printit).start()
5  print "Hello, World!"
6
7printit()