Ad
Fundamentals
Code
Diff
  • is_even=eval(compile('lambda\tl:~l&True','','eval'))
    • #is_even=lambda n:not(n%(ord('ࠀ')>>ord('\n'))) # left in the single space here
    • # this also works with more regexes:
    • def is_even(n):
    • return not(n%(ord('ࠀ')>>ord('\n')))
    • is_even=eval(compile('lambda\tl:~l&True','','eval'))
Code
Diff
  • const evenOrOdd = n => n&1;
    • const evenOrOdd = n => !(n%2)
    • const evenOrOdd = n => n&1;