0
does the return statement dépends on thé argument given to thé function? because this function prints none because there was no argument given to it.
2 ответов
+ 1
Not directly. 'return' will actually return whatever you pass to it. ex:
def func(x):
return x**2
print(func(6))
in example above the function gets x and after processing the input returns it. But if you just use return with no value, it will return none.
The return statement without value is used for exiting the function early under special conditions.
0
ofcorse thar will return 36