步骤

  1. 用Python中的list方法使字符串 列表化
  2. 用list中的reverse方法对其 翻转
  3. 判断翻转之后的 和 翻转之前两个list是否相同
  4. 相同为True,否则为FALSE
    class Solution:
     def judge(self , str ):
         # write code here
         chars = list(str)
         chars.reverse()
         charsRev = chars.copy()
         chars.reverse()
         if chars == charsRev:
             return True
         return False
    

```