convert integer to binary

Jan Olderdissen jolderdissen at ixiacom.com
Fri May 2 17:05:09 EDT 2003


>I couldn't find any function in Python to convert integers to binary
>and vice versa, for example:

Try int ("1111", 2) to go from binary to integer. For the reverse
direction, you'll probably have to implement a couple of lines of
actual code. :-)

Jan




More information about the Python-list mailing list