Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43082

Re: Splitting of string at an interval

References (1 earlier) <5161e996$0$29995$c3e8da3$5496439d@news.astraweb.com> <mailman.263.1365390121.3114.python-list@python.org> <roy-024D82.09215608042013@news.panix.com> <CAJ6cK1aWX3cPxFaHgqd=YJAJSmbA3b+mj4TYuEiW0cUCBtiabA@mail.gmail.com> <D77F906C-B07F-4A6B-B0E0-05B94AA006CE@panix.com>
Date 2013-04-09 02:20 +1000
Subject Re: Splitting of string at an interval
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.294.1365438020.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith <roy@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

Okay, that's just getting 2AM stupid now. :)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Splitting of string at an interval subhabangalore@gmail.com - 2013-04-07 13:25 -0700
  Re: Splitting of string at an interval Dave Angel <davea@davea.name> - 2013-04-07 16:46 -0400
  Re: Splitting of string at an interval Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-07 21:48 +0000
    Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-08 13:01 +1000
      Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 09:21 -0400
        Re: Splitting of string at an interval Arnaud Delobelle <arnodel@gmail.com> - 2013-04-08 16:10 +0100
        Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 11:37 -0400
        Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-09 02:20 +1000
        Re: Splitting of string at an interval Arnaud Delobelle <arnodel@gmail.com> - 2013-04-08 17:30 +0100
          Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 21:09 -0400
            Re: Splitting of string at an interval Tim Chase <python.list@tim.thechases.com> - 2013-04-08 20:42 -0500
            Re: Splitting of string at an interval Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-09 02:38 +0000
              Re: Splitting of string at an interval Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-08 21:57 -0500
              Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-09 14:22 +1000
              Re: Splitting of string at an interval Dave Angel <davea@davea.name> - 2013-04-09 02:28 -0400
        Re: Splitting of string at an interval Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-04-08 19:15 -0400

csiph-web