Digital clock with python

 # Digital clock

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"70),background="#101010"foreground="#00ff00" )
label.pack(anchor="center")
time()
mainloop()

Comments