以下函数用于检查字符串是否为回文。
def palindrome(string): return string == string[::-1] palindrome('python') # False
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8