import tkinter as tk

root = tk.Tk()                # Root widget

# Place with pack
# pack_label = tk.Label(
#     root,                   # Add to main widget
#     fg='white',             # Set foreground color
#     bg='black',             # Set background color
#     text="My first GUI!"    # Add label to main widget
# )
# pack_label.pack()

# Place out label widget into the center of our main window
label = tk.Label(
    root,                   # Add to main widget
    fg='white',             # Set foreground color
    bg='black',             # Set background color
    text="My placed label!"    # Add label to main widget
)
label.place(
    relx=0.5,
    rely=0.5,
    anchor='center',
)

# Create additional labels but place it with the grid
# label_two = tk.Label(
#     root,
#     fg='white',
#     bg='black',
#     text='My first'
# )
# label_two.grid(row=0,column=0)
# label_three = tk.Label(
#     root,
#     fg='blue',
#     bg='black',
#     text='GUI label'
# )
# label_three.grid(row=1,column=0)
# label_three = tk.Label(
#     root,
#     fg='green',
#     bg='black',
#     text='placed with Grid!'
# )
# label_three.grid(row=1,column=1)

# Like a "game" loop, we need something continuously looping
# to create the main window
root.mainloop()
