| 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])
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.