Python - Easy to understand
\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        set_words = dict()\n        count = 0\n        \n        for word in words
```\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        set_words = dict()\n        count = 0\n        \n        for word in words:\n            # If reverse exists add in pair (4)\n            if word[::-1] in set_words and set_words[word[::-1]]>0:\n                count += 4\n                set_words[word[::-1]] -= 1\n            else:\n                if word not in set_words:\n                    set_words[word]  = 1\n                else:\n                    set_words[word] += 1\n\n        for word, value in set_words.items():\n            # In the middle of the string we can add element without pair but equal like: "aa", "bb"\n            if word[0] == word[1] and value == 1:\n                count +=2                \n                break\n                \n        return count                     \n```
['Python']