@@ -0,0 +1,467 @@
+class Solution(object):%0A    def longestWord(self, words):%0A        %22%22%22%0A        :type words: List%5Bstr%5D%0A        :rtype: str%0A        %22%22%22%0A        words = sorted(words, key=lambda w:(len(w), w))%0A        prefix_dict = set()%0A        max_word = ''%0A        for w in words:%0A            if len(w) == 1 or w%5B:-1%5D in prefix_dict:%0A                prefix_dict.add(w)%0A                if len(w) %3E len(max_word) or w %3C max_word:%0A                    max_word = w%0A        return max_word%0A

Add py solution for 720. Longest Word in Dictionary