As in the say_hello method of Greeter, we need to create a main frame. We here do that in the main() function. We then use that frame for the instance of Greeter and the rest of the program.
def main():
root = Tk()
app = Greeter(master=root)
app.mainloop()
root.destroy()
The object of Greeter is called app. The master of that instance is root, the main frame of the program. After instantiating app, we can then call its mainloop method to run the program. Once all is said and done, the last call of the main() function is to destroy the root window.
