সোনাতলা ফাজিল মাদ্রাসায় শিক্ষার্থী ভর্তি চলছে।
সোনাতলা ফাজিল মাদ্রাসায় শিক্ষার্থী ভর্তি চলছে।
import tkinter as tk
from time import strftime
def update_time():
# Get current time in HH:MM:SS AM/PM format
string_time = strftime('%H:%M:%S %p')
# Update the label text with the new time
digital_clock.config(text=string_time)
# Schedule the function to run again after 1000ms (1 second)
digital_clock.after(1000, update_time)
# Initialize the main window
root = tk.Tk()
root.title("Digital Clock")
# Configure the label to show the time
digital_clock = tk.Label(
root,
font=('calibri', 40, 'bold'),
background='black',
foreground='white'
)
# Place the label in the window
digital_clock.pack(pady=20)
# Start the initial call to update_time
update_time()
# Run the application
root.mainloop()
