Skip to content

Commit 7c40ccd

Browse files
committed
Update palindrome-permutation.py
1 parent 12cf79a commit 7c40ccd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/palindrome-permutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ def canPermutePalindrome(self, s):
77
:type s: str
88
:rtype: bool
99
"""
10-
return sum(v % 2 for k, v in collections.Counter(s).iteritems()) < 2
10+
return sum(v % 2 for v in collections.Counter(s).values()) < 2

0 commit comments

Comments
 (0)