2.4. Return Statement#
All functions inherently return a value. If a return
statement is absent in a function, the None
data type is automatically returned by default.
def f(x):
x = x * 2
res = f(3)
res
print(res)
id(res)
None
9678144
def f(x):
x = x * 2
return None
print(f(3))
None