how to get rid of a window in tkinter code example
Example: hide root window tkinter
root = tk.Tk()
# Hide it with .withdraw
root.withdraw()
# To reveal it again:
root.deiconify()
root = tk.Tk()
# Hide it with .withdraw
root.withdraw()
# To reveal it again:
root.deiconify()