Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
choose one of 6, to your taste ) solution in Creative category for Is Even by roman.bratishchev
is_even=lambda n:not n%2 # straight-forward
is_even=lambda n:bin(n)[-1]=='0' # for string lovers
is_even=lambda n:not n&1 # is not it cute?
is_even=lambda n:n>>1<<1==n # for C lovers - I like it most ))
is_even=lambda n:n^1==n+1 # welcome to the binary world
is_even=lambda n:n|1!=n # the shortest!
Dec. 12, 2025