#pack布局.py
import tkinter
root=tkinter.Tk()
root.geometry('300x300+300+300') #窗口的高度x宽度
root.config(bg='#ccff00') #窗口的颜色
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()