PHP
·
发表于 5年以前
·
阅读量:7439
以下函数用于检查字符串是否为回文。
def palindrome(string):
return string == string[::-1]
palindrome('python') # False