Python, что делает меткаPython

Программы на Python
Гость
Python, что делает метка

Сообщение Гость »


hey guys can anyone explain this code

Код: Выделить всё

from tkinter import *

def create_window():
new_window = Tk()
old_window.destroy()
Label(new_window,text='hi').pack()
old_window = Tk()

Button(old_window,text="create new window!",command=create_window,).pack()

old_window.mainloop()
why he write the lable intead of just writing text= in new_window and who actually lable work
I searched for this topic on YouTube, but I did not find an answer to my question. they just writes a label without any explanation as to why he wrote it.


Источник: https://stackoverflow.com/questions/781 ... s-lable-do

Вернуться в «Python»