import tkinter as tk
win=tk.Tk()
win.title('Frame的练习')
win.geometry('300x400')
fm=tk.Frame(win)
fm_l=tk.Frame(fm,background='green',bd=3)
fm_r=tk.Frame(fm)
fm_l.pack(side='left')
fm_r.pack(side='right')
label=tk.Label(fm_l,text='左frame',font=('Arial,12'),bg='yellow').pack()
label2=tk.Label(fm_r,text='右frame',font=('Arial,12'),bg='green').pack()
fm.pack()
win.mainloop()