Binary numbers

sampe99 at my-deja.com sampe99 at my-deja.com
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

/Sam


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list