Good question!
Both `.geometry("400x400")` and `.config(width=400, height=400)` can be used to resize a `Tk` window, but they behave a bit differently:
`.geometry("400x400")`
- This sets the **entire size of the root window**, including window decorations like borders and the title bar.
- It accepts a string in the format `"widthxheight"`, and is the standard way to size the main window.
`.config(width=..., height=...)`
- This sets the **internal dimensions** of the window’s content area (the client area).
- Depending on the platform and window manager, the total window size might become slightly larger due to decorations.
Which one should you use?
- For setting the initial size of a `Tk()` root window, `.geometry()` is generally preferred because it accounts for the full window.
-Use `.config()` more often for widgets (like `Frame`, `Canvas`, etc.) rather than the root window itself.
[Official tkinter docs on geometry](https://docs.python.org/3/library/tkinter.html#geometry-method)
Hope this clears it up!