I want to make "=" button higher so it cover the space above(also wanna make "." wider so it also covers space) what I am getting
so I want to join the cell above "=" and cell next to ".", wanna make one "big" button
window = tk.Tk()
window.title("Calculator")
window.geometry("400x500")
window.resizable(False, False)
entry = tk.Entry(window, font=("Arial", 30))
entry.grid(row=0, column=0, columnspan=5, sticky="nsew")
buttons = [
("1", "2", "3", "C", "/"),
("4", "5", "6", "√", "*"),
("7", "8", "9", "<-", "+"),
("0", "(", ")", "-"),
(" ", " ", ".", "^", "=")
]
for row_idx, row in enumerate(buttons):
for col_idx, button_text in enumerate(row):
if button_text != " ":
button = tk.Button(window, text=button_text, font=("Arial", 20), padx=3, pady=2,
command=lambda text=button_text: click(text))
button.grid(row=row_idx+1, column=col_idx, sticky="nsew")
for i in range(5):
window.grid_columnconfigure(i, weight=1)
for i in range(len(buttons) + 1):
window.grid_rowconfigure(i, weight=1)
window.mainloop()