Ad

Using bit flip operator

Code
Diff
  • is_even = lambda x: ~x%2
    
    • is_even = lambda x: not x % 2
    • is_even = lambda x: ~x%2