So for example: 0 10 11 100 101 110 111
And so on.
I would like to have it go infinitely, but that might not be possible. I have already tried this:
lista = [1,2,3,4,5,6,7,8,9,10]
listres = [str(bin(x))[2:].zfill(4) for x in lista]
print(listres)
And it works, but it is all one line, and also not infinite.
while True: digit = random.choice([0,1])