With itertools.product
it's easy to generate all the Littlewood coefficients:
for coefficients in product(*([[-1, 1]] * DEGREE)):
and then with numpy.roots
it's easy to generate all the roots for that polynomial:
for root in roots((1,) + coefficients):