# CCI - Problem 1.4 # Determine whether a given string is a permutation of a palindrome import string s = input("Enter a string: ") s = s.replace(' ','') permPal = True print(s) count = 0 chcount = [] for i in range(0,len(s)): for j in range(0,len(s)): if (s[i]==s[j]): count += 1 j += 1 chcount.append(count) count = 0 for n in chcount: if (n % 2 != 0): permPal = False if (permPal == True): print("The given string is a permutation of a palindrome.") else: print("The given string is a not permutation of a palindrome.") # CCI - Problem 1.4 # Determine whether a given string is a permutation of a palindrome import string s = input("Enter a string: ") s = s.replace(' ','') permPal = True print(s) count = 0 chcount = [] for i in range(0,len(s)): for j in range(0,len(s)): if (s[i]==s[j]): count += 1 j += 1 chcount.append(count) count = 0 for n in chcount: if (n % 2 != 0): permPal = False if (permPal == True): print("The given string is a permutation of a palindrome.") else: print("The given string is a not permutation of a palindrome.") # CCI - Problem 1.4 # Determine whether a given string is a permutation of a palindrome import string s = input("Enter a string: ") s = s.replace(' ','') permPal = True print(s) count = 0 chcount = [] for i in range(0,len(s)): for j in range(0,len(s)): if (s[i]==s[j]): count += 1 j += 1 chcount.append(count) count = 0 for n in chcount: if (n % 2 != 0): permPal = False if (permPal == True): print("The given string is a permutation of a palindrome.") else: print("The given string is a not permutation of a palindrome.")