
Exercise for reference:
Create a program that prints outHello every two seconds.
Answer:
import time
while True:
print("Hello")
time.sleep(2)
Explanation:
The sleep method of the built-in time module suspends the execution of the script for the given number of seconds.