diff --git a/clock.py b/clock.py new file mode 100644 index 0000000..4bdbc70 --- /dev/null +++ b/clock.py @@ -0,0 +1,16 @@ +import tkinter as tk +import time + +def update_time(): + current_time = time.strftime("%H:%M:%S") + label.config(text=current_time) + root.after(1000, update_time) + +root = tk.Tk() +root.title("Clock") + +label = tk.Label(root, text="", font=("Helvetica", 48)) +label.pack(pady=20) + +update_time() +root.mainloop()