1import sys
2from tkinter import *
3import time
4
5def times():
6 current_time=time.strftime("%H:%M:%S")
7 clock.config(text=current_time)
8 clock.after(200,times)
9
10
11root=Tk()
12root.geometry("500x250")
13clock=Label(root,font=("times",50,"bold"),bg="black",fg='blue')
14clock.grid(row=2,column=2,pady=25,padx=100)
15times()
16
17digi=Label(root,text="Digital clock",font="times 24 bold",fg="violet")
18digi.grid(row=0,column=2)
19
20nota=Label(root,text="hours minutes seconds ",font="times 15 bold")
21nota.grid(row=3,column=2)
22
23root.mainloop()
24
1please subscribe my channel - https://bit.ly/2Me2CfB
2
3from tkinter import *
4import time
5import playsound
6
7root = Tk()
8root.geometry('600x175')
9root.title("Clock")
10root.config(background='black')
11
12def clock():
13 main_time = time.strftime("%H:%M:%S:%p")
14 lbl.config(text=main_time)
15 lbl.after(1000, clock)
16
17lbl = Label(root, text="", font=('Digital Display Regular', 90), bg="black", fg="cyan")
18lbl.pack(anchor=CENTER)
19
20clock()
21root.mainloop()