from tkinter import *
root = Tk()
root.title('Test')
def change_text():
print(my_label)
my_label.config(text='new text')
my_label.grid(row=0, column=0)
# create
my_label = Label(root, text='Hello World')
my_button = Button(root, text='click me', command=change_text, bg='#FFFF00')
# draw
my_label.grid()
my_button.grid()
# run
root.mainloop()
stud_input=StringVar()
stud_input.set("Label")
lbl3=Label(add_image_frame,textvariable=stud_input,bg="#ED6244",fg="black").grid(row=4,column=0)
stud_input.set("Changed Label")
l = tk.Label(text="hello, world")
...
print("the label is", l.cget("text"))