On 16 September 2011 21:20, Ian Kelly <[email protected]> wrote:
> On Fri, Sep 16, 2011 at 2:17 PM, Arnaud Delobelle <[email protected]> wrote:
>> Ah go on, let's make a codegolf contest out of it.
>> My entry:
>>
>>>>> sum(map(int,str(2**1000)))
>> 1366
>
> That is exactly what mine was.
>
Slightly longer:
>>> eval("+".join(str(2**1000)))
1366
This looks like a winner but I cheated (the result depends on the
state of the interpreter):
>>> eval("+".join(`2**1000`))
1366
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list