以下示例是关于Python中包含在Python中用WAP检查一个数字是否是调色板用法的示例代码,想了解在Python中用WAP检查一个数字是否是调色板的具体用法?在Python中用WAP检查一个数字是否是调色板怎么用?在Python中用WAP检查一个数字是否是调色板使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。
#A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward.
#Ex: madam or racecar.
#CODE BY VENOM
a=input("Enter you string:\n")
w=str(a)
if w==w[::-1]: # w[::-1] it will reverse the given string value.
print("Given String is palindrome")
else:
print("Given String is not palindrome")
#CODE BY VENOM
#CODE BY VENOM
本文地址:https://www.itbaoku.cn/snippets/785563.html