I am trying to execute a function called alarm in background while function called clock is running. this is my alarm function. As code inside is complex I am only putting an example.
def Alarm():
while True:
current_time = dt.datetime.now().time()
if timetable[0] == current_time:
print("Its time")
break
clock()
Alarm()
root.mainloop()
The Function isn't executing in background but it executes first and then GUI is started.