# Task
 Given a string `s`, find out if its characters can be rearranged to form a palindrome.

# Example

 For `s = "aabb"`, the output should be `true`.

 We can rearrange `"aabb"` to make `"abba"`, which is a palindrome.

# Input/Output


 - `[input]` string `s`

    A string consisting of lowercase English letters.

    Constraints:

    `4 ≤ inputString.length ≤ 50.`


 - `[output]` a boolean value

    `true` if the characters of the inputString can be rearranged to form a palindrome, `false` otherwise.

Difficulty: introductory

Starter code:

def palindrome_rearranging(s):
	

Solutions:
def palindrome_rearranging(s):
    return sum(s.count(c) % 2 for c in set(s)) < 2

from collections import Counter

def palindrome_rearranging(s):
    return sum(n % 2 for n in Counter(s).values()) <= 1

def palindrome_rearranging(s):
    d = {}
    c = 0
    for x in s:
        if x not in d:
            d[x] = 1
        else:
            d[x] += 1
    for k, v in d.items():
        if v % 2 != 0:
            c += 1
    return c <= 1

from collections import Counter

def palindrome_rearranging(s):
    return sum(v%2 for v in Counter(s).values()) < 2

from collections import Counter
palindrome_rearranging=lambda s:len(list(filter(lambda x:x&1,Counter(s).values())))<2

def palindrome_rearranging(s):
    odd =0
    for char in set(s):
        if s.count(char)%2 != 0:
            odd+=1
    if odd>1:
        return False
    else:
        return True

def palindrome_rearranging(s):
    return [s.count(i)%2 for i in set(s)].count(1) == len(s)%2

def palindrome_rearranging(s):
    for c in s:
        if s.count(c) > 1:
            s = s.replace(c, "", 2)
    return len(s) < 2


def palindrome_rearranging(s):
    return sum(s.count(char) % 2 for char in set(s)) <= 1


from collections import Counter
def palindrome_rearranging(s):
    return len([v for v in Counter(s).values() if v%2]) < 2