If i have a main window in tkinter, then I click a button and it opens another window (secondary window) and minimize the first one and then i decide to click on a button on this second window to go back to the first window (like a "return button") how can i do this option of returning to the first window by pressing the botton on the second window in tkinter? Thanks!
import tkinter as tk
def funcion():
otra_ventana = tk.Toplevel(root)
root.iconify()
def funcion2():
vuelta_ventana.iconify()
root.deiconify()
root = tk.Tk()
boton = tk.Button(root, text="Abrir otra ventana", command=funcion)
boton2 = tk.Button(root, text="return", command=funcion2)
boton.pack()
root.mainloop()