(self)
return result + ')'
Get a string representation of
        the monomial.
Get a string representation of
        the monomial.
Get a string representation of the monomial .
def __str__(self) -> str:
        """
        Get a string representation of
        the monomial.
        """
        if len(self.variables) == 0:
            return str(self.coeff)

        result = str(self.coeff)
        result += '('
        for i in self.variables:
            temp = 'a_{}'.format(str(i))
            if self.variables[i] > 1:
                temp = '(' + temp + ')**{}'.format(self.variables[i])
            elif self.variables[i] < 0:
                temp = '(' + temp + ')**(-{})'.format(-self.variables[i])
            elif self.variables[i] == 0:
                continue
            else:
                temp = '(' + temp + ')'
            result += temp
        return result + ')'
def __str__ ( self ) -> str : if len ( self . variables ) == 0 : return str ( self . coeff ) result = str ( self . coeff ) result += '(' for i in self . variables : temp = 'a_{}' . format ( str ( i ) ) if self . variables [ i ] > 1 : temp = '(' + temp + ')**{}' . format ( self . variables [ i ] ) elif self . variables [ i ] < 0 : temp = '(' + temp + ')**(-{})' . format ( - self . variables [ i ] ) elif self . variables [ i ] == 0 : continue else : temp = '(' + temp + ')' result += temp return result + ')'