from tkinter import* import time tc = 5 def tempo(tc): while tc: mins, secs = divmod(tc, 60) timer = '{:02d}:{:02d}'.format(mins, secs) print(timer, end="\r") time.sleep(1) tc -= 1 print("ouverture") fenetre = Tk() label = Label(fenetre, text=tempo(tc)) label.pack() fenetre.mainloop()