leetcode-easy-string-

Posted rosyyy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了leetcode-easy-string-相关的知识,希望对你有一定的参考价值。

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

技术图片

 

以上是关于leetcode-easy-string-的主要内容,如果未能解决你的问题,请参考以下文章