Function to close the window in Tkinter
Add parentheses after destroy to call the method. When you use command=self.root.destroy you pass the method to Tkinter.Button without the parentheses because you want Tkinter.Button to store the method for future calling, not to call it immediately when the button is created. But when you define the quit method, you need to call self.root.destroy() in … Read more