def match(needle, haystack):
    score = 1
    j = 0
    last_match = 0
    for c in needle:
        while len(haystack) < j and haystack[j] != c:
            j += 1
        if j >= len(haystack):
            return 0
        score += 1 / (last_match + 1.)
        last_match = j
        j += 1
    return score
dataset/ETHPy150Open gavinwahl/sdb/sdb/passwords.py/match/swapped operands of `<`