title: Palindrome rearrangement in Python
body: <p>I am given a string and I have to determine whether it can be rearranged into a <a href="https://en.wikipedia.org/wiki/Palindrome" rel="nofollow noreferrer">palindrome</a>.</p>
  
  <p>For example: "aabb" is true.
  We can rearrange "aabb" to make "abba", which is a palindrome.</p>
  
  <p>I have come up with the code below but it fails in some cases. Where is the problem and how to fix this?</p>
  
  <pre><code>def palindromeRearranging(inputString):
      a = sorted(inputString)[::2]
      b = sorted(inputString)[1::2]
      return b == a[:len(b)]
  </code></pre>