import tkinter
win = tkinter.Tk()
win.title("sunck")
win.geometry("400x400+200+20")
'''
Label:標簽控件可以顯示文本
'''
#win 父窗體
#text 顯示的文本內容
#bg 背景色
#fg 字體顏色
#wraplength 指定text文本中多寬進行換行
#justify 設置換行后的對齊方法
#anchor 位置 n北 e東 s南 w西 center居中 ne se sw nw
label = tkinter.Label(win,
text="sunck",
bg="blue",
fg="red",
font=("黑體", 20),
width=10,
height=4,
wraplength=100,
justify="left",
anchor="center")
#顯示出來
label.pack()
win.mainloop()