I have a function which returns true/false. Now I tried to use in a condicional, like this:
isOdd = lambda n: True if n%2 != 0 else False
if !isOdd(2):
print('Yey')
but I got SyntaxError: invalid syntax
how could I use ! in a function like this? it looks like this only works if:
if isOdd(2) == False:
print('Yey')