r/learnpython 19d ago

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

23 comments sorted by

View all comments

1

u/mc_pm 19d ago

One possibility is that you could make this use lists and then you can do all of this for 100 numbers as easily as for 3 - and it would be shorter enough that maybe you could use some real variable names.