def palindromeRearranging(inputString):
return sum(map(lambda x: inputString.count(x) % 2, set(inputString))) <= 1
import collections
def palindromeRearranging(inputString):
cnt = collections.Counter()
odds = 0
for i in range(len(inputString)):
cnt[inputString[i]] += 1
for i in cnt:
if cnt[i]%2 == 1:
odds += 1
return odds <= 1
def check_palindrome_1(string):
reversed_string = string[::-1]
status=1
if(string!=reversed_string):
status=0
return status
string = input("Enter the string: ")
status= check_palindrome_1(string)
if(status):
print("It is a palindrome ")
else:
print("Sorry! Try again")