def getRes(x): Str = str(x) for i in range(0,int(len(Str)/2)): if Str[i] != Str[-i-1]: return False return True print(getRes("aca")) print(getRes("abc"))
python 判断字符是否为回文
猜你喜欢
转载自blog.csdn.net/qq_38949135/article/details/105182539
今日推荐
周排行