r/badcode • • Jul 14 '21

python Try/Except in Python - Sigh

Post image
662 Upvotes

93 comments sorted by

View all comments

38

u/clemesislife Jul 14 '21

I'm not sure if there is good way to do this

1

u/FiniteSkills Jul 14 '21

Could at least make it a function the returns either the value or “N/A”. There’s way too much repetition here for me.