with open("primitive_roots.txt") as file: primitive_roots = list(int(line) for line in filter(bool, file.read().split("\n")))