from collections import Counter
class Solution(object):
    def frequencySort(self, s):
        """
        :type s: str
        :rtype: str
        """
        c = Counter(s)
        return ''.join(a * b for a, b in sorted(c.iteritems(), key=lambda x:-x[1]))

Add py solution for 451. Sort Characters By Frequency
Add py solution for 451. Sort Characters By Frequency

451. Sort Characters By Frequency: https://leetcode.com/problems/sort-characters-by-frequency/
