[Solved] Difference between return and return True in python [closed]

[ad_1]

They are not the same. The first will implicitly return None:

def f():
    return

print f() #None

while the second will return True:

def f():
    return True

print f() #True

Note: True and False are booleans in Python.

[ad_2]

solved Difference between return and return True in python [closed]