import collections
# @include
def can_string_be_a_palindrome(s):
# A string can be permuted to form a palindrome if and only if the number
# of chars whose frequencies is odd is at most 1.
return sum(v % 2 for v in collections.Counter(s).values()) <= 1
# @exclude