python coding contest
Tim Hochberg
tim.hochberg at ieee.org
Tue Dec 27 16:02:57 EST 2005
Shane Hathaway wrote:
> Paul McGuire wrote:
>
>>"Paul McGuire" <ptmcg at austin.rr._bogus_.com> wrote in message
>>news:0v6sf.9742$9e.3250 at tornado.texas.rr.com...
>><snip>
>>
>>>Well *I'm* certainly looking forward to learning some new tricks! My
>>>(non-cheat) version is a comparatively-portly 245, and no alternatives are
>>>popping into my head at the moment!
>>>
>>>-- Paul
>>>
>>>
>>
>>down to 2 lines, 229 characters
>
>
> I'm down to 133 characters (counted according to 'wc -c') on a single
> line. It contains about 11 whitespace characters (depending on what you
> consider whitespace.) It's way too tricky for my taste, but it's fun to
> play anyway. Has anyone done better so far? Here's a hint on my
> strategy: the code contains three large integers. :-)
I see now how three large integers could be useful, but the best I could
do with that is 136 characters on 1-line. Yesterday that would have been
great, but it's not so hot today.
>
> Also, here's another cheat version. (No, 7seg.com does not exist.)
>
> import urllib2
> def seven_seg(x):return urllib2.urlopen('http://7seg.com/'+x).read()
>
And another one from me as well.
class a:
def __eq__(s,o):return 1
seven_seg=lambda i:a()
-tim
More information about the Python-list
mailing list