Is there any practical differences between using:
def some_function():
print('Hello!')
return()
and:
def some_function():
print('Hello!')
I know that return isn’t required, but is it bad pratice to not return after a function has been called?
First of all,
returnis not a function; it is a statement. There is no need to add the parenthesis.Functions in python without a return statement return
Noneby default. An emptyreturnstatement does the same, so there is no difference.