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


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.

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