Easy understanding python solution
\nclass Solution(object):\n    def longestWord(self, words):\n        """\n        :type words: List[str]\n        :rtype: str\n        """\n        words.sort(
```\nclass Solution(object):\n    def longestWord(self, words):\n        """\n        :type words: List[str]\n        :rtype: str\n        """\n        words.sort()\n        candidates = []\n        res = ""\n        max_len = 0\n        first_flag = True\n        for item in words:\n            if len(item) == 1:\n                candidates.append(item)\n                if first_flag:\n                    res = item\n                    max_len = 1\n                    first_flag = False\n\n            else: \n                if item[:-1] in candidates:\n                    candidates.append(item)\n                    if len(item) > max_len:\n                        res = item\n                        max_len = len(item)\n        \n        return res\n```
[]