Back to course home
0% completed
Vote For New Content
My Solution
Thai Minh
Jul 24, 2023
class Solution: def isPalindrome(self, s: str) -> bool: # TODO: Write your code here str_array = [] for char in s: if char.isalpha() or char.isdigit(): str_array.append(char.lower()) front, back = 0, len(str_array) - 1 while front < back: if str_array[front] != str_array[back]: return False front += 1 back -= 1 return True
0
0
Comments
Comments
On this page