#-*- encoding:utf-8 -*- from tkinter import * root = Tk() def create(): top = Toplevel() top.title('Python') v1 = StringVar() e1 = Entry(top,textvariable=v1,width=10) e1.grid(row=1,column=0,padx=1,pady=1) Button (top, text = 'level 2 appears'). Grid (row = 1, column = 1, padx = 1, pady = 1) Button (root, text = 'click level 1', command = create). Pack() mainloop()
The way to click a button to jump out of another window in the above Python 3 Tkinter implementation is to share all the content with you. I hope to give you a reference, and I hope you can support developepaer more.