#importing tkinter
from tkinter import *
#creating a root window
root = Tk()
#creating a window with specific dimensions
root.geometry("250x100")
#create a button with text and required action post button click
button = Button(root,text = "Click Here",command = root.destroy)
#adjust the button location
button.pack(side = 'left')
root.mainloop()
0 Comments