# TrieNode template class class TrieNode(): # Initialize TrieNode instance def __init__(self): # Empty list of child nodes self.children = [] # False indicates this node is not the end of a word self.complete = False # Create 26 child nodes for each letter of alphabet for i in range(0, 26): self.children.append(None)