An enthusiastic Python learner and want to be a Python developer.
`from tkinter import * import time
Creating window for displaying clock
clk_win = Tk() clk_win.geometry("220x220")
Give black color as background
clk_win.config(bg= "black")
Providing a label for clock
clk_name = Label(clk_win, text = "This is a user made clock", fg= "white", bg="magenta") clk_name.pack()
Defining clock display
clock = Label(clk_win, fg= "blue", font = ("ariel", 40, "bold")) clock.pack()
Defining function to call the clock module and update time in 1 second interval
def update(): clock.config(text = time.strftime("%I:%M:%S")) clock.after(1000,update)
Calling update clock function
update()
Running the clock window
mainloop()'