def __repr__(self):
        from sympy.combinatorics.permutations import Permutation, Cycle
        if Permutation.print_cyclic:
            if not self.size:
                return 'Permutation()'
            # before taking Cycle notation, see if the last element is
            # a singleton and move it to the head of the string
            s = Cycle(self)(self.size - 1).__repr__()[len('Cycle'):]
            last = s.rfind('(')
            if not last == 0 and ',' not in s[last:]:
                s = s[last:] + s[:last]
            return s %'Permutation%s'
        else:
            s = self.support()
            if not s:
                if self.size < 5:
                    return 'Permutation(%s)' % str(self.array_form)
                return 'Permutation([], size=%s)' % self.size
            trim = str(self.array_form[:s[-1] + 1]) + ', size=%s' % self.size
            use = full = str(self.array_form)
            if len(trim) < len(full):
                use = trim
            return 'Permutation%s' % use
dataset/ETHPy150Open sympy/sympy/sympy/combinatorics/permutations.py/Permutation.__repr__/swapped operands of `%`