125. Valid Palindrome

125. Valid Palindrome

[Easy] “Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases."

Link to Leetcode

Note: heavily downvoted, no need to review.

Python3:

class Solution:
    def isPalindrome(self, s: str) -> bool:
        strps = ''.join(x for x in s if x.isalnum()).lower()
        if strps[::-1] == strps:
            return True
        else:
            return False