So I know python has the not operator, but how does the not() function come into play?
From some simple testing it appears that it has the signature of not(args[]), while at the same time not acting entirely like a normal function. For example:
x = True
not x # -> False
not(x) # -> False
x = False
not x # -> True
not(x) # -> True
not(0) # -> True
not(1) # -> False
not(0, 0, 0) # -> False
not("False") # -> False
function = not # -> Syntax Error
Why does this exist for "not", and not something like "or"? Is there a way I can capture the not function into a variable / do other manipulation with not as a function?
This question was mostly prompted by attempting to find a single function to invert a list in a map call, even if it is an internal function