(self, n)
return _af_new(perm_array)
Generates a random permutation of length ``n``.

        Uses the underlying Python psuedo-random number generator.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.random(2) in (Permutation([1, 0]), Permutation([0, 1]))
        True
Generates a random permutation of length ``n``.
Generates a random permutation of length n .
def random(self, n):
        """
        Generates a random permutation of length ``n``.

        Uses the underlying Python psuedo-random number generator.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.random(2) in (Permutation([1, 0]), Permutation([0, 1]))
        True

        """
        perm_array = list(range(n))
        random.shuffle(perm_array)
        return _af_new(perm_array)
def random ( self , n ) : perm_array = list ( range ( n ) ) random . shuffle ( perm_array ) return _af_new ( perm_array )