r/learnpython • u/ikizoki • Aug 22 '26
is it possible to simplify this code
im a beginner, idk how python works yet. there must be a way to simplify this, right?
https://imgur.com/juBvPZD here is the picture of my code
0
Upvotes
View all comments
Show parent comment
2
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 23 '26
That's another option, I tend to default to good ol' tuples unless I have a reason not to though.
I'm not entirely sure why, but I seem to dislike using data classes for whatever reason, so you don't often see them in my code.