def foo(a):
    print(\"I\'m foo\")
    return False
if foo:
    print(\"OK\")
else:
    print(\"KO\")
I run it and it returns OK. I know, I should h
python if condition statisfies if the value is not equal to any of these
0, None, "", [], {}, False, ()
Here
def foo(a):
    print("I'm foo")
    return False
>>>foo
 That means variable foo pointing to the function.If you call your function foo(arg) then it will return False as you expecting.So 
>>>foo("arg")
False