Skip to content

Commit 0173fc9

Browse files
Digital Clock: add 12/24-hour toggle button and 'f' shortcut
1 parent db19bc8 commit 0173fc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Digital Clock/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from time import strftime
2-
from tkinter import Label, Tk
2+
from tkinter import Label, Tk , Button
33

44
window = Tk()
55
window.title("Digital Clock")
@@ -27,7 +27,7 @@ def update_label():
2727
clock_label.pack(anchor="center")
2828

2929
update_label()
30-
window.mainloop()def update_label():
30+
window.mainloop() def update_label():
3131
clock_label.configure(text=strftime("%H:%M:%S"))
3232
date_label.configure(text=strftime("%A, %b %d, %Y"))
3333
clock_label.after(1000, update_label)

0 commit comments

Comments
 (0)