I have been playing around with functions and recursion and I don't understand why this would output None. I expected it to output [1,1,1,1,1,1,1,1,1,1,1] but even though there is an explicit return function it outputs None.
list = []
def func(x):
x.append(1)
if len(x) >10:
return x
else:
func(x)
print (func(list))
Output:
None