a=0100; print a ; 64 how to reverse this?

Daniel no at no.no
Tue Jul 17 22:55:05 CEST 2007


On Tue, 17 Jul 2007 21:22:03 +0300, Wildemar Wildenburger  
<wildemar at freakmail.de> wrote:

>
> Bruno Desthuilliers wrote:
>> mosi a écrit :
>>
>>> Problem:
>>> how to get binary from integer and vice versa?
>>> [snip]
>>> What`s the simplest way to do this?
>>>
>>
>> bruno at bruno:~$ python
>> Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
>> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>  >>> help(int)
>> Help on class int in module __builtin__:
>>
>> class int(object)
>>   |  int(x[, base]) -> integer
>>
>
> :D
>
> After reading the other two replies, this one made me burst with  
> laughter. Thanks for that.

Why exactly?



More information about the Python-list mailing list