def _coeffs_generator(n):
    for coeffs in variations([1, -1], n, repetition=True):
        yield list(coeffs)
Generate coefficients for `primitive_element()`.
dataset/ETHPy150Open sympy/sympy/sympy/polys/numberfields.py/_coeffs_generator