binary numbers

Darren Kirby bulliver at badcomputer.no-ip.com
Tue Oct 5 18:59:25 EDT 2004


quoth the Larry Bates:
> Integers are stored in memory as binary.
>
> x=5
>
> stores 5 in x in binary form.
>

>>> x=5
>>> x
5
>>>

 I think our friend is looking for a module or function that turns 5 into 101 
(or perhaps 00000101)

Brad, have a look here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/219300

-d
-- 
Part of the problem since 1976
http://badcomputer.no-ip.com
Get my public key from 
http://keyserver.linux.it/pks/lookup?op=index&search=bulliver
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20041005/d587e06d/attachment.sig>


More information about the Python-list mailing list