from tkinter import *
root = Tk()
Button(root,text = "a").pack(side = LEFT,expand = YES,fill = Y)
Button(root,text = "b").pack(side = TOP,expand = YES , fill = BOTH)
Button(root,text= "c") .pack(side = RIGHT,expand =YES,fill=NONE,anchor =NE)
Button(root,text ="d") .pack(side = LEFT,expand =NO ,fill= Y)
Button(root,text= "E") .pack(side = TOP,expand =NO ,fill= Y)
Button(root,text= "F") .pack(side = BOTTOM,expand =YES)
Button(root,text= "G") .pack(anchor = SE)
root.mainloop()