Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Python's all() and any() functions are your friends here:

if all(ListBasis[i][w].polynomial().ord() != ListBasis[i-1][y].polynomial.ord() for w in range(d[i])):
        d.add(ListBasis[i][w])