HTMLify

LeetCode - Valid Palindrome - Python
Views: 13 | Author: abh
class Solution:
    def isPalindrome(self, s: str) -> bool:
        fls = "".join([c for c in s.lower() if c in "pyfgcrlaoeuidhtnsqjkxbmwvz1234567890"])
        return fls == fls[::-1]

Comments