Setting options

#At object creation time, using keyword arguments
fred = Button(self, fg="red", bg="blue")

#After object creation, treating the option name like a dictionary index
fred["fg"] = "red"
fred["bg"] = "blue"

#Use the config() method to update multiple attrs subsequent to object creation
fred.config(fg="red", bg="blue")
#import tkinter
from tkinter import *

window = Tk()
window.title("My first GUI Program")
window.minsize(width=500, height=300)

#Label

my_labal = Label(text="I Am a Label", font=("Arial", "24", "bold"))
my_labal.pack()

my_label["text"] = "New text"
my_label.config(text = "New text")

#Button

def button_clicked():
    print("I got clicked")
    new_text = input.get()
    my_label.config(text=new_text)

button = Button(text="Click me", command=button_clicked)
button.pack()

#Entry
def input_filled():
    my_label.config(text=input.get())

input = Entry(width=10)
input.pack()

window.mainloop()