I am looking for an iterative way to implement a word recognizer for a NFA in Python. This is my main idea and what I got until now:
from collections import d