Create a digital clock using Python
The full source code is available here
Hi programmers,
In this blog, I will share a complete source code for a python Tkinter GUI clock. So Let's get started to code.
from tkinter import from tkinter.ttk import
from time import strftime
root = Tk() root.title("Clock")
def time(): string = strftime('%H:%M:%S %p') label.config(text=string) label.after(1000, time)
label = Label(root, font=("ds-digital", 80), background="black", foreground="cyan") label.pack(anchor='center') time()
mainloop()
Output :
It would be greatly appreciated if you would give me a like 💓 and if you found this blog to be informative, please follow me and share it with your friends who are interested in learning how to code.
Join my nas.io page and support me: click here
Use This link to get 37% off: link
Thank you so much :)
#CrazyBlogger