Create A Digital Clock In Python | #Python #Shorts|CyberwarriorsAp|
CyberwarriorsAP
Hey Guys, Today we’re going learn how to create a Simple Digital Clock using Python in a few lines of code. For building this Clock we will require the tkinter and time module.
First, we need to install the Tkinter module. If you don’t have this module already installed in your system then you can install the same using the pip package manager by typing "pip install tkinter".
Here's the full video link.. https://youtu.be/vOhLO_qaloE
And Here's the code..
from tkinter import* from tkinter.ttk import*
from time import strftime
root = Tk() root.title = ("Digital Clock")
def time(): string = strftime('%H:%M:%S %p') label.config (text=string) label.after(1000,time)
label = Label (root , font = ("Old English Text MT",80), background = "Black", foreground = "red") label.pack(anchor="center") time()
mainloop()
So If you loved 💗 this video please LIKE SHARE AND SUBSCRIBE TO MY CHANNEL and Hit the bell 🔔 Icon for my latest video notifications .
#CyberwarriorsAP #python @CyberwarriorsAP
Create Digital Clock Using Python Create Digital Clock Using Python Create Digital Clock Using Python
1327206 Bytes