def main():
    m = int(sys.argv[1]) if len(sys.argv) > 1 else 300
fname = 'primebits'
primebytes = load_primes(fname)
primelist = []
for p in primes(primebytes):
    if p > m:
        break
primelist.append(p)
print(primelist)
if __name__ == '__main__':
    main()
Хранение переменных как отдельных битов