Binary numbers

sampe99 at sampe99 at
Tue Feb 6 11:10:09 EST 2001

Does anyone know an easy way to get a list of binary numbers within a
certain range in python? E.g for
n=1 [0],[1]
n=2 [0,0],[0,1],[1,0],[1,1]
n=3 [0,0,0],[0,0,1] a.s.o

I need this for n<=18...

Thanks a lot in advance


Sent via

More information about the Python-list mailing list