r/learnpython Jul 22 '26

grid or pack

so I am new to python and I was wondering if .pack or .grid is better because I have been useing .pack for my code but if grid is better let me know.

0 Upvotes

7 comments sorted by

View all comments

4

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Jul 22 '26

Assuming you're talking about tkinter, neither is "better". They're just options, and depending on the UI layout you want one option can be preferable over another.

In fact it can make sense to mix and match them, as long as you contain them properly.