Palindrome Check using for loop in python
p = list(input()) for i in range(len(p)): if p[i] == p[len(p)-1-i]: continue else: print("NOT PALINDROME") break else: print("PALINDROME")
Source: www.vpropel.in
python palindrome
def palindrome(a): return a == a[::-1] palindrome('radar') # True
palindrome words python
mes=input("Enter the word and see if it is palindrome ") if mes==mes[::-1]: print("This word is palindrome") else: print("This word is not palindrome")
python palindrome check
#Palindrome check word = 'reviver' p = bool(word.find(word[::-1]) + 1) print(p) # True
Source: zerotomastery.io