How to delay a Python loop
July 6th, 2020 in Blog, Python, UncategorizedIn this blog post, I will run through 3 different ways to execute a delayed Python loop. In these examples, we will aim to run the loop once every minute.To show the delay, we will print out the current datetime using the datetime module. 1 – SleepThe sleep function from Python’s time module pauses the Python execution by the number of seconds inputted. The example below pauses the script for 60 seconds. The above script has a 60 second…
» Read more