I am expecting the result to be 10 but it returns None, any idea why?
def function(index):
if index==9:
print(index)
return 10
else:
print(index)
index=index+1
function(index)
print(function(6))
``
I am expecting the result to be 10 but it returns None, any idea why?
def function(index):
if index==9:
print(index)
return 10
else:
print(index)
index=index+1
function(index)
print(function(6))
``