Source Code :
# import time and tkinter libraries
import time
import tkinter as tk
# define function for clock tick
def tick(time1 =''):
# get the current time from PC
time2 = time.strftime('%H:%M:%S')
if time2!= time1:
time1 = time2
clock.config(text =time2)
clock.after(200,tick)
root= tk.Tk()
clock = tk.Label(root,font =('arial',40,'bold'),bg='green')
clock.pack(fill ='both',expand=1)
tick()
root.mainloop()
Output :
