We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12cf79a commit 7c40ccdCopy full SHA for 7c40ccd
1 file changed
Python/palindrome-permutation.py
@@ -7,4 +7,4 @@ def canPermutePalindrome(self, s):
7
:type s: str
8
:rtype: bool
9
"""
10
- return sum(v % 2 for k, v in collections.Counter(s).iteritems()) < 2
+ return sum(v % 2 for v in collections.Counter(s).values()) < 2
0 commit comments