标签:string self obj str mamicode color return ret image
mycode
注意以下陷阱
class Solution(object): def isPalindrome(self, s): """ :type s: str :rtype: bool """ res = s = [i for i in s if i != ‘ ‘] print(s) res.reverse() print(s) print(res) return res == s
标签:string self obj str mamicode color return ret image
原文地址:https://www.cnblogs.com/rosyYY/p/10996320.html