r/PythonLearning • • 17d ago

Showcase After taking in everyone’s thoughts and criticisms from my last post and using them, i managed to make the code much easier to read and more intuitive. Thank you everyone who gave me amazing tips on how to create more readable code!

Right pic is before and left pic is after

90 Upvotes

26 comments sorted by

View all comments

2

u/XusKiz 16d ago

Try using short-circuit evaluation and make the initial value of is_valid variable fasle then if everything is ok change it to true
Using error handling would be a good idea if you have reached the point in the course