✔️ Python Simple and Easy Way to Solve with Explanation | 97% Faster 🔥
\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D\n\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        loo
**\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D**\n```\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        lookup = Counter(words)\n        p_len = 0\n        mid = 0\n        \n        for word in lookup.keys():\n            if word[0] == word[1]:\n                if lookup[word]%2 == 0:\n                    p_len += lookup[word]\n                else:\n                    p_len += lookup[word]-1\n                    mid = 1\n                    \n            elif word[::-1] in lookup:\n                p_len += min(lookup[word], lookup[word[::-1]])\n        \n        return (p_len + mid) * 2\n```\n**For Detail explaination with diagram read this blog:\nhttps://www.python-techs.com/2022/11/longest-palindrome-by-concatenating.html**\n\n**Thank you for reading! \uD83D\uDE04 Comment if you have any questions or feedback.**
['Python', 'Python3']