def explore(state):
    key = (tuple(state[0]),tuple(state[1])) # lists can't be hashed in Python because they are mutable, so convert to a tuple
    if key in states: return states[key]
    i = counter[0]
    counter[0] += 1
    states[key] = i
    if lev.is_match(state): matching.append(i)
    for c in lev.transitions(state) | set(['*']):
        newstate = lev.step(state, c)
        j = explore(newstate)
        transitions.append((i, j, c))
    return i
dataset/ETHPy150Open julesjacobs/levenshtein/levenshtein.py/explore/original