Pencere arası geçiş yapma

arkadaşlar “def geri():” fonksiyonuna bakarsanız kapatılan pencereye geri dönme işlemi yapmak istiyorum nasıl yapabilirim yardımcı olur musunuz ?

from tkinter import*
from tkinter import messagebox

pencere = Tk()
pencere.title("Giriş Ekranı")
pencere.geometry("400x700")
pencere.resizable(FALSE, FALSE)
pencere.configure(bg="white")

kullanici = "admin"
sifre = "1234"

def giris():
    s1 = str(entkullanici.get())
    s2 = str(entsifre.get())
    if s1 == kullanici and s2 == sifre:
        messagebox.showinfo("Sistem Giriş Bilgisi", "Sisteme Giriş Yapıldı.")
        
        pencere.destroy()
        
        pencere2 = Tk()
        pencere2.title("Panel")
        pencere2.geometry("1350x780")
        pencere2.resizable(FALSE,FALSE)
        pencere2.configure(bg="white")

        arkaplan2 = PhotoImage(file="pencere2.png")
        arkaplan2foto = Label(image=arkaplan2)
        arkaplan2foto.place(x=0, y=0)

        def iktisat1():
            pencere2.destroy()

            iktisatpuanları = Tk()
            iktisatpuanları.title("İktisat Puanları")
            iktisatpuanları.geometry("1350x780")
            iktisatpuanları.resizable(FALSE, FALSE)
            
            iktisatpuanarkaplan = PhotoImage(file="iktisatpuanları.png")
            iktisatpuanlarıarka = Label(image=iktisatpuanarkaplan)
            iktisatpuanlarıarka.place(x=0, y=0)

            def geri():
                iktisatpuanları.destroy()

                

            geributon1 = Button(iktisatpuanları, text="Geri", font="arial 16  bold", command=geri)
            geributon1.place(x=1006, y=620)


            iktisatpuanları.mainloop()

        def ekonomi1():
            pencere2.destroy()

            ekonomipuanları = Tk()
            ekonomipuanları.title("Ekonomi Puanları")
            ekonomipuanları.geometry("1350x780")
            ekonomipuanları.resizable(FALSE, FALSE)

            ekonomipuanarkaplan = PhotoImage(file="ekonomipuanları")
            ekonomipuanlarıarka = Label(image=ekonomipuanarkaplan)
            ekonomipuanlarıarka.place(x= 0,y=0)

            ekonomipuanları.mainloop()

        def yönetimbilisim1():
            pencere2.destroy()

            yönetimpuanları = Tk()
            yönetimpuanları.title("Yönetim Bilişim Sistemleri Puanları")
            yönetimpuanları.geometry("1350x780")
            yönetimpuanları.resizable(FALSE, FALSE)

            yönetimpuanarkaplan = PhotoImage(file="yönetimbilisimpuanları.png")
            yönetimpuanlarıarka = Label(image=yönetimpuanarkaplan)
            yönetimpuanlarıarka.place(x=0,y=0)

            yönetimpuanları.mainloop()

        def isletme1():
            pencere2.destroy()

            isletmepuanları = Tk()
            isletmepuanları.title("İşletme Puanları")
            isletmepuanları.geometry("1350x780")
            isletmepuanları.resizable(FALSE, FALSE)

            isletmepuanarkaplan = PhotoImage(file="isletmepuaları.png")
            isletmepuanlarıarka = Label(image=isletmepuanarkaplan)
            isletmepuanlarıarka.place(x=0,y=0)

            isletmepuanları.mainloop()

        def akrediteögren1(): 

            pencere2.destroy()

            pencere3 = Tk()
            pencere3.title("Akredite Öğren")
            pencere3.geometry("1350x780")
            pencere3.resizable(FALSE, FALSE)

            arkaplan3 = PhotoImage(file="pencere3.png")
            arkaplan3foto = Label(pencere3, image=arkaplan3)
            arkaplan3foto.place(x=0, y=0)

            def iktisat22():
                messagebox.showinfo("Sistem Bilgi","")

            def ekonomi22():
                messagebox.showinfo("Sistem Bilgi","")

            def yönetimbilisim22():
                messagebox.showinfo("Sistem Bilgi","")

            def isletme22():
                messagebox.showinfo("Sistem Bilgi","")            

            
            iktisatfoto2 = PhotoImage(file="iktisat.png")
            iktisat2 = Button(pencere3, text="İktisat", image=iktisatfoto2, command=iktisat22,width=200, height=100)
            iktisat2.place(x=191, y=250)

            ekonomifoto2 = PhotoImage(file="ekonomi.png")
            ekonomi2 = Button(pencere3, text="İktisat",image=ekonomifoto2, font="arial 40 bold",command=ekonomi22,width=200, height=100)
            ekonomi2.place(x=191, y= 400)

            yönetimfoto2 = PhotoImage(file="yönetimbilisim.png")
            yönetimbilisim2 = Button(pencere3, text="İktisat",image=yönetimfoto2, font="arial 40 bold", command=yönetimbilisim22,width=200, height=100)
            yönetimbilisim2.place(x=913, y=250)
        
            isletmefoto2 = PhotoImage(file="işletme.png")
            isletme2 = Button(pencere3, text="İktisat",image=isletmefoto2, font="arial 40 bold", command=isletme22,width=200, height=100)
            isletme2.place (x=913, y=400)
                    
            pencere3.mainloop()

            
        iktisatfoto = PhotoImage(file="iktisat.png")
        iktisat = Button(pencere2, text="İktisat", image=iktisatfoto, command=iktisat1,width=200, height=100)
        iktisat.place(x=191, y=250)

        ekonomifoto = PhotoImage(file="ekonomi.png")
        ekonomi = Button(pencere2, text="İktisat",image=ekonomifoto, font="arial 40 bold",command=ekonomi1,width=200, height=100)
        ekonomi.place(x=191, y= 400)
        
        yönetimfoto = PhotoImage(file="yönetimbilisim.png")
        yönetimbilisim = Button(pencere2, text="İktisat",image=yönetimfoto, font="arial 40 bold", command=yönetimbilisim1,width=200, height=100)
        yönetimbilisim.place(x=913, y=250)
        
        isletmefoto = PhotoImage(file="işletme.png")
        isletme = Button(pencere2, text="İktisat",image=isletmefoto, font="arial 40 bold", command=isletme1,width=200, height=100)
        isletme.place (x=913, y=400)
        
        akreditefoto = PhotoImage(file="akrediteögren.png")
        akrediteogren = Button(pencere2, text=" Akredite Öğren ", image=akreditefoto, font="arial 22 bold", command=akrediteögren1,width=200, height=100)
        akrediteogren.place(x=1006, y=620)

        pencere2.mainloop()

    else:
        messagebox.showerror("Sistem Giriş Bİlgisi", "Kullanıcı Adı Veya Şifre Hatalı.")
        entkullanici.delete(0,"end")
        entsifre.delete(0,"end")

def sifunuttum():
    messagebox.showinfo("Sistem Bilgi", "Yöneticiden Giriş Şifrenizi Alınız.")  

arkaplan = PhotoImage(file="pencere1.png")
arkaplanfoto = Label(image=arkaplan)
arkaplanfoto.place(x=0, y=0)

entkullanici = Entry(pencere, font="arial 16")
entkullanici.place(x=80, y=227)

entsifre = Entry(pencere, font="arial 16", show="*")
entsifre.place(x=80, y=347)

girisbuton = Button(pencere, text="        Giriş Yap        ", font="arial 16 bold", command=giris)
girisbuton.place(x=99, y=521)

sifunuttum = Button(pencere, text="  Şifremi Unuttum  ", font="arial 16 bold", command=sifunuttum)
sifunuttum.place(x=99.2, y=642)


pencere.mainloop()

1 giriş kısmı
2 pencere2 ve buradan da butonlar vasıtası ile her butonun açtığı pencereler oluşturmuşsun. her buton için açılan pencerede geri gelmek için pencere2 yi tekrar göstermen gerekiyor.

butonlar ile açtığın pencerede göstereceğin bilgiler neler olacak bilemiyoruz ama tasarımda değişikliğe gidersen butonlara bağladığın pencere oluşturma işini Tk() ile değil de Toplevel() ile yapman daha iyi olur gibi. pencere2 yi kapatmadan ayrı bir pencere oluşturur orada bilgileri gösterirsin işin bittiğinde direkt o pencereyi kapatabilirsin.

yada pencere2 de 2 frame oluşturup bir frameye butonları, diğer frameye butonlara bağladığın fonksiyonun çalıştığı bilgileri gösterebilirsin.

ama illa her buton için yeni bir pencere oluşturacağım diyorsan build multiple pages and back button in tkinter(python) - YouTube yorumların içinde class ve fonsiyonlarla yapılmış örneği var.