• I have a small problem with this exercise.

 

I would like to give some feedback about this exercise, because I don't know, why tests don't pass. below I put my code and errors.

def isometric_strings(a, b):
    a1=''
    b1=''
    for i in range(len(a)-1):
        if a[i]==a[i+1]:
            a1+='+'
        else:
            a1+='-'
    for i in range(len(b)-1):
        if b[i]==b[i+1]:
            b1+='+'
        else:
            b1+='-'
    return a1==b1


if __name__ == "__main__":
    print("Example:")
    print(isometric_strings("add", "egg"))

    # These "asserts" are used for self-checking and not for an auto-testing
    assert isometric_strings("add", "egg") == True
    assert isometric_strings("foo", "bar") == False
    assert isometric_strings("","") == True
    assert isometric_strings("all", "all") == True
    assert isometric_strings("gogopy", "doodle") == False
    print("Coding complete? Click 'Check' to earn cool rewards!")

From: https://py.checkio.org/mission/isometric-strings/solve/

HTTP_USER_AGENT:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36