from tkinter import * # create a tkinter window root = Tk() # Create a Button btn = Button(root, text = 'Click me !', bd = '5', command = root.destroy) # Set the position of button on the top of window. btn.pack(side = 'top') root.mainloop()