binary numbers
Brad Tilley
bradtilley at gmail.com
Tue Oct 5 19:46:15 EDT 2004
Darren Kirby wrote:
> 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
Thanks, this is what I need.
More information about the Python-list
mailing list