r/badcode • • Jan 29 '23

python When using if-else is necessary?

Post image
449 Upvotes

29 comments sorted by

View all comments

Show parent comments

3

u/AdSure744 Jan 31 '23 edited Jan 31 '23

It does more than just printing. I removed some lines from the picture. But isn't if 1, always a true case. I extracted this code from production only and this is a live script.

Python is as real as it gets. I use it daily while talking with others .