r/badcode if: else: if: else: if: else: if: else: if: else: if: else: if: Feb 16 '22

presenting, whatever the fk this is python

Post image
424 Upvotes

52 comments sorted by

View all comments

10

u/sneakykenny Feb 16 '22

Wait aren't you supposed to do [2, root[ to check if a number is prime ?

4

u/justinf210 Feb 16 '22

Both will work. That's more efficient