mport tkinter
root=tkinter.Tk()
root.geometry('300x200+300+300')
root.title('pack布局')
root.config(bg='red')
label=tkinter.Label(root,text='hello,python')
label.pack()
button1=tkinter.Button(root,text='BUTTON1')
button1.pack(side=tkinter.LEFT)
button2=tkinter.Button(root,text='BUTTON2')
button2.pack(side=tkinter.RIGHT)
root.mainloop()