Add first two digits and if they give a result of two digits or more, add the following two

def strycomprovar (s):
result = str (s)
for c in the result:
if c> = "0" and c <= "9":
final result + = c
return finalultult
def condensed (s):
result = 15
i1 = 0
12 = 1
while the result <= 10:
result = stryproduct (s)[i1] + strycomprovar (s)[i2]
        i1 + = 1
i2 + = 1
returned result

This gives me an error that is intinerable.
An example of the serious function:
condensed impression (524a4)