#!/usr/bin/env python3
import random
while True:
s = ""
for i in range(0, 500):
s = s + str(random.randint(0, 1))
print(s)
input()
The random module computes random numbers using the Mersenne Twister algorithm... Functions in random() should not be used in programs related to cryptography. If you need such functionality, consider using functions in the ssl module instead. For example, ssl.RAND_bytes() can be used to generate a cryptographically secure sequence of random bytes.