Working with previous cases

import time

count = 5
while true:
		time.sleep()
		count -= 1

Event driven graphical user program

#1 
#you can see that after 1000 milliseconds, basically one second, 
#it calls this function, say_something, and it passes this hello as the input
#to that function.

def say_something(thing):
		print(thing)

window.after(1000, say_something, "Hello")
--------------------------------------
Hello
#2
#you can have an infinite amount of positional arguments.

def say_something(a, b, c):
		print(a)
		print(b)
		print(c)

window.after(1000, say_something, 3, 5 ,8)
--------------------------------------
3
5
8

Countdown

def count_down(count):
		if count > 0:		
				window.after(1000, count_down, count - 1)

count_down(5)

-------------
5
4
3
2
1
0
def count_down(count):
		canvas.itemconfig(timer_text, text=count)
		if count > 0:		
				window.after(1000, count_down, count - 1)

Start Timer as min:sec

def start_timer():
    count_down(5*60)

# ---------------------------- COUNTDOWN MECHANISM ------------------------------- # 
def count_down(count):
    count_min = math.floor(count/60)
    count_sec = count % 60

    canvas.itemconfig(timer_text, text=f"{count_min}:{count_sec}")
    if count > 0:
        window.after(1000, count_down, count - 1)