codeforces/600C_palindrom.py
def calculate(self):
        """ Main calcualtion function of the class """

        result = []
        mid = []

        for c in sorted(self.pcnt):
            n = self.pcnt[c]
            if n > 0:
                for j in range(n // 2):
                    result.append(c)
                if n % 2:
                    mid.append(c)

        return "".join(result + mid + list(reversed(result)))
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = []
        mid = []
        for c in sorted(self.pcnt):
            n = self.pcnt[c]
            if n > 0:
                for j in range(n // 2):
                    result.append(c)
                if n % 2:
                    mid.append(c)
        return "".join(result + mid + list(reversed(result)))
def calculate ( self ) : result = [ ] mid = [ ] for c in sorted ( self . pcnt ) : n = self . pcnt [ c ] if n > 0 : for j in range ( n // 2 ) : result . append ( c ) if n % 2 : mid . append ( c ) return "" . join ( result + mid + list ( reversed ( result ) ) )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self