DALGLI0/main.py
2018-06-26 02:05:11 +02:00

15 lines
439 B
Python

import itertools
class PolyIntField:
def __init__(self, int_modulo, poly_modulo):
self.int_modulo = int_modulo
self.poly_modulo = poly_modulo
self.elements = list(itertools.product([x for x in range(0, int_modulo)]
, repeat=len(poly_modulo) - 1))
if __name__ == "__main__":
a = PolyIntField(3, [1, 1, 2, 2])
print(a.elements)
print(len(a.elements))