def search(self, word):
        cur = self.root
        for w in word:
            if w in cur.children:
                cur = cur.children[w]
            else:
                return False

        if not cur.ended:  # not ended here
            return False

        return True
Updates the editor when the object trait changes externally to the
dataset/ETHPy150Open algorhythms/LeetCode/208 Implement Trie (Prefix Tree).py/Trie.search--crossover with--dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/color_editor.py/TextColorEditor.update_editor