converting to a binary number?

Kent Johnson kent at kentsjohnson.com
Fri Mar 24 15:57:50 EST 2006


John Salerno wrote:
> I'm having some trouble finding a function that converts numbers 
> (whether integer, hex, whatever) to its binary representation. Is there one?

You might like this recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/111286

Kent



More information about the Python-list mailing list