I am creating a timer for my quiz app and I decided to try it out first in a separate program, however when I run the following code and press the 'start timer' button the app simply stops responding and I am forced to close it through the task manager
from tkinter import *
import time
root=Tk()
root.geometry('{}x{}'.format(300,200))
lb=Label(root,text='')
lb.pack()
def func(h,m,s):
lb.config(text=str(h)+':'+str(m)+':'+str(s))
time.sleep(1)
s+=1
func(h,m,s)
if s==59:
m=1
s=0
bt=Button(root,text='start timer',command=lambda:func(0,0,0))
bt.pack()
root.mainloop()