from tkinter import * window=Tk() window.title("Python") window.configure(bg= '#ff5f00') f1=Frame() f2=Frame() t1 = Label(f1,width=10, height=5,bg='yellow',text='1') t2 = Label(f1,width=10, height=5,bg='green',text='2') t3 = Label(f2,width=10, height=5,bg='blue',text='3') t4 = Label(f2,width=10, height=5,bg='orange',text='4') f1.pack() f2.pack() t1.pack(side=LEFT) t2.pack(side=LEFT) t3.pack(side=LEFT) t4.pack(side=LEFT) window.mainloop()