import tkinter as tk root=tk.Tk() root.geometry("300x275") B=tk.Button(root,text="button",command= lambda:fun() ,width=5,font=("Arial",14)) B.grid(columnspan=5,row=5,column=2) B.place(relx=0.5, rely=0.5, anchor='center') root.mainloop()