import threading def printit(): threading.Timer(5.0, printit).start() print "Hello, World!" printit() # continue with the rest of your code
https://docs.python.org/3/library/threading.html#timer-objects
1.4m articles
1.4m replys
5 comments
57.0k users