Skip to main content


Simple Digital Clock in Python



# Simple Digital Clock
# Download font: https://www.dafont.com/ds-digital.font

from tkinter import *
from tkinter.ttk import *
from time import strftime

root = Tk()
root.title("Clock")

def time():
     string = strftime("%I:%M:%S %p")
     label.config(text=string)
     label.after(1000,time)
     
label = Label(root,font=("Baskerville Old Face",240), background = "#009bde", foreground="cyan")
label.pack(anchor="center")
time()

mainloop()

Comments



🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍

Popular Posts

Python underline string, Python underline text, Underline python print

Python pip - Installing modules from IDLE (Pyton GUI) for python 3.7

Top 40 Python - String Processing in Python | Working with String in Python

Python Program - When was I born? / Date of Birth / MY BIRTHDAY (using Python3+)

Top 11 Essential Python Tips and Tricks





Subscribe to our Channel


Follow us on Facebook Page

Join our python facebook groups



Join us on Telegram