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


Groups > comp.lang.python > #43034

Re: Splitting of string at an interval

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.095
X-Spam-Evidence '*H*': 0.83; '*S*': 0.02; 'subject:string': 0.09; '"in': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'literal.': 0.16; 'shortcut': 0.16; 'wrote:': 0.18; 'small,': 0.19; 'programming': 0.22; 'mon,': 0.24; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'words': 0.29; 'message- id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'problem': 0.35; 'received:google.com': 0.35; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'skip:u 10': 0.60; 'break': 0.61; 'simple': 0.61; 'apart': 0.72; 'thing,': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=TyUKFYFTwPltMeW8iQxqL9EbBxce32u7p743en1hIFg=; b=UqjCmHn7N9RI7PjESed/FXCtXgbkOgYCdBzJ8ztmVVf5eDqpnYLcPOV6s2d95OyPYn lvEHBudsTWB9rz3rqBdlTTlVXN18nLr1L2NoxCOWI95EBLltla6fAK0n4ukA3M3LRTeP B6KyKJBWpaMrz1tpLNXkYKvJVZlmRLJ3YXM7osxc0FvRlAA6DwNeAAGezHGZXbDalLtu eHnXi0Y9l2GaOrbFP+6+sxcUlLEtyeVFibcU+O7kihaCc/ZFHxZzcqY3ZnfSg/WPjuWX 0Ae8fJhDyVUCT2NdEp/eEsGEwSoyrouUJmCq10/+JPrhaiGii4qARIeg9nccQtyU9hsA j/Ag==
MIME-Version 1.0
X-Received by 10.66.87.5 with SMTP id t5mr103231paz.169.1365390117460; Sun, 07 Apr 2013 20:01:57 -0700 (PDT)
In-Reply-To <5161e996$0$29995$c3e8da3$5496439d@news.astraweb.com>
References <e66efa13-c35d-4169-b3cc-3617d3d6a8c7@googlegroups.com> <5161e996$0$29995$c3e8da3$5496439d@news.astraweb.com>
Date Mon, 8 Apr 2013 13:01:57 +1000
Subject Re: Splitting of string at an interval
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.263.1365390121.3114.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365390121 news.xs4all.nl 6840 [2001:888:2000:d::a6]:36544
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43034

Show key headers only | View raw


On Mon, Apr 8, 2013 at 7:48 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> Like every programming problem, the solution is to break it apart into
> small, simple steps that even a computer can follow.
> ...

5) Shortcut the whole thing, since the problem was underspecified, by
using a literal.

words = ["The Sun", "rises in", "in the", "east of", "our earth"]

*dive for cover against rotten tomatoes*

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