`trie_struct: Callable = lambda: defaultdict(trie_struct)`
To work properly it’ll need a real terminator (maybe `trie.setdefault(None)`). This “implementation” only works if there are no words that substring other words.
`trie_struct: Callable = lambda: defaultdict(trie_struct)`
To work properly it’ll need a real terminator (maybe `trie.setdefault(None)`). This “implementation” only works if there are no words that substring other words.