Created Digital-Clock.py

This commit is contained in:
Sourodip Kar 2022-10-06 00:37:50 +05:30 committed by GitHub
parent a917ec89d3
commit b46c7e01a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
import tkinter
from time import strftime
top = tkinter.Tk()
top.title('Digital Clock')
top.resizable(0,0)
def time():
string = strftime('%H: %M: %S %p')
clockTime.config(text=string)
clockTime.after(1000, time)
clockTime = tkinter.Label(top, font=('courier new', 40),
background='white',foreground='black')
clockTime.pack(anchor='center')
time()
top.mainloop()