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")
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")
Check if a string is lapindrome or not in Python
s=input()
s1,s2='',''
if(len(s)%2==0):
s1=s[:len(s)//2]
s2=s[len(s)//2:]
else:
s1=s[:len(s)//2]
s2=s[len(s)//2+1:]
l1=list(s1)
l2=list(s2)
l1.sort()
l2.sort()
s1=str(l1)
s2=str(l2)
if(s1==s2):
print('YES')
else:
print('NO')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us