Consider these three functions:
def my_func1():
print "Hello World"
return None
def my_func2():
print "Hello World"
return
def my_func3():
print "Hello World"
They all appear to return None
. Are there any differences between how the returned value of these functions behave? Are there any reasons to prefer one versus the other?
See also: is it possible to not return anything from a function in python?