I am typing this code in Google Colabs
def mytimer():
print("Python Program\n")
my_timer = threading.Timer(0.8, mytimer)
my_timer.start()
print("Bye\n")
In some cases I get the output as
Bye
At other times, I get
Bye
Python Program
Why is this difference occuring? Should I add any other line of code? Or any criteria I should be careful about?