r/badcode •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

68 comments sorted by

View all comments

Show parent comment

1

u/them0use Aug 28 '19

Thought of a way to make it even “better”. What’s a modulo??

is_leap_year = lambda y: y in [ x for x in range(0,y+1,4) if x not in range(0, y+1, 100) and x <= y ]