Splitting of string at an interval
Roy Smith
roy at panix.com
Mon Apr 8 21:09:08 EDT 2013
In article <mailman.295.1365438635.3114.python-list at python.org>,
Arnaud Delobelle <arnodel at gmail.com> wrote:
> On 8 April 2013 17:20, Chris Angelico <rosuav at gmail.com> wrote:
> > On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith <roy at panix.com> wrote:
> >> I can't help point out, however, that if your initial implementation is to
> >> have your code return a constant, it's pretty likely to be an optimum
> >> solution in both time and space :-)
> >
> > Likely, but not certain.
> >
> > # 1
> > def fifty_stars():
> > return "**************************************************"
> >
> > # 2
> > fifty_stars=lambda "*"*50
>
> There's a whole competition about writing the smallest program which
> outputs the song "99 bottles of beer":
>
> http://codegolf.com/99-bottles-of-beer
I see the top 10 entries are all written in Perl. I suppose this says
something.
More information about the Python-list
mailing list