[Solved] Code returns invalid syntax [closed]


Your return statements and indentation are messed up:

def tag_count(string_list):
    count=0
    for string in string_list:
        if string.endswith('>') and string.startswith('<'):
             count += 1
    return count
print (tag_count(["test","<item>","test"]))

1

solved Code returns invalid syntax [closed]