(n)
Generates the symmetric group of order n, Sn.

    Examples
    ========

    >>> from sympy.combinatorics.permutations import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.generators import symmetric
    >>> list(symmetric(3))
    [Permutation(2), Permutation(1, 2), Permutation(2)(0, 1),
     Permutation(0, 1, 2), Permutation(0, 2, 1), Permutation(0, 2)]
Generates the symmetric group of order n, Sn.
Generates the symmetric group of order n Sn .
def symmetric(n):
    """
    Generates the symmetric group of order n, Sn.

    Examples
    ========

    >>> from sympy.combinatorics.permutations import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.generators import symmetric
    >>> list(symmetric(3))
    [Permutation(2), Permutation(1, 2), Permutation(2)(0, 1),
     Permutation(0, 1, 2), Permutation(0, 2, 1), Permutation(0, 2)]
    """
    for perm in variations(list(range(n)), n):
        yield Permutation(perm)
def symmetric ( n ) : for perm in variations ( list ( range ( n ) ) , n ) : yield Permutation ( perm )