This is a Python 3 implementation of a Trie data structure with no external dependencies.
Create trie like this:
trie = Trie.Trie()
Insert words into trie like this:
trie.insert(”word”)
Search the trie for an exact match like this:
trie.search(”word”)
Search the tree for a prefix like this:
trie.startswith(”prefix”)