(n)
Generates the cyclic group of order n, Cn.

    Examples
    ========

    >>> from sympy.combinatorics.permutations import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.generators import cyclic
    >>> list(cyclic(5))
    [Permutation(4), Permutation(0, 1, 2, 3, 4), Permutation(0, 2, 4, 1, 3),
     Permutation(0, 3, 1, 4, 2), Permutation(0, 4, 3, 2, 1)]

    See Also
    ========
    dihedral
Generates the cyclic group of order n, Cn.
Generates the cyclic group of order n Cn .
def cyclic(n):
    """
    Generates the cyclic group of order n, Cn.

    Examples
    ========

    >>> from sympy.combinatorics.permutations import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.generators import cyclic
    >>> list(cyclic(5))
    [Permutation(4), Permutation(0, 1, 2, 3, 4), Permutation(0, 2, 4, 1, 3),
     Permutation(0, 3, 1, 4, 2), Permutation(0, 4, 3, 2, 1)]

    See Also
    ========
    dihedral
    """
    gen = list(range(n))
    for i in xrange(n):
        yield Permutation(gen)
        gen = rotate_left(gen, 1)
def cyclic ( n ) : gen = list ( range ( n ) ) for i in xrange ( n ) : yield Permutation ( gen ) gen = rotate_left ( gen , 1 )