if s1 == '':
    result = s2
elif s2 == '':
    result = s1
else:
    test = recur_var(s1[:-1], s2[:-1])
if s1[-1] == '1' and s2[-1] == '1':
    result = True
else:
    result = test
return result
Рекурсия внутри переменной