I have written two recursive functions in python.
The first one takes parameters, modifies them, and returns a value.
def Similarity(string, sstring1, index):
if condition1:
return index
if condition2:
#do something
Similarity(string, string1, index)
The second one takes parameters and performs operations on a global variable.
def getData(i, value):
global dataList
if condition:
return list(suffixList)
#do something
getData(i, value)
These functions work perfectly and do the exact computations I need but always return a NoneType.
I haven't been able to figure out why.
return smth but Noneor without return at all return None.