Write a function to find out if permutations of a given string is a palindrome


Topic: Write a function to find out if permutations of a given string is a palindrome

Solution

def has_palindrome_permutation(the_string):
    unpaired_characters = set()
    for char in the_string:
        if char in unpaired_characters:
            unpaired_characters.remove(char)
        else:
            unpaired_characters.add(char)
    return len(unpaired_characters) <= 1				   
		
		



List all Python Programs