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


Groups > comp.lang.python > #41395

Re: [Python 2.7.3] What's the difference between these two uses of "for"?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.05; 'subject:two': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:2.7.3': 0.16; 'subject:between': 0.16; 'subject:these': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'url:view': 0.18; 'subject:] ': 0.19; 'question.': 0.20; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'included': 0.29; 'code': 0.31; 'print': 0.32; 'message.': 0.33; 'to:addr:python-list': 0.33; 'code:': 0.33; 'pm,': 0.35; 'received:org': 0.36; 'but': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python.org': 0.39; 'short': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'here': 0.65; 'received:fios.verizon.net': 0.84; 'tricky': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: [Python 2.7.3] What's the difference between these two uses of "for"?
Date Mon, 18 Mar 2013 00:37:50 -0400
References <485a3093-8c07-4d1a-b49e-af32f84f8198@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
In-Reply-To <485a3093-8c07-4d1a-b49e-af32f84f8198@googlegroups.com>
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.3410.1363581489.2939.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1363581489 news.xs4all.nl 6971 [2001:888:2000:d::a6]:60856
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41395

Show key headers only | View raw


On 3/17/2013 8:58 PM, Yves S. Garret wrote:
> N00b question.  But here is the code:
>
> http://bin.cakephp.org/view/709201806

Short code like this should be included in your message.

tricky = sorted([w for w in set(text2) if 'cie' in w or 'cei' in w])
for word in tricky:
   print word,

for word in sorted([w for w in set(text2) if 'cie' in w or 'cei' in w]):
   print word,

-- 
Terry Jan Reedy

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


Thread

[Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 17:58 -0700
  Re: [Python 2.7.3] What's the difference between these two uses of "for"? Andrew Berg <bahamutzero8825@gmail.com> - 2013-03-17 20:24 -0500
  Re: [Python 2.7.3] What's the difference between these two uses of "for"? Gary Herron <gary.herron@islandtraining.com> - 2013-03-17 18:18 -0700
    Re: [Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 18:59 -0700
    Re: [Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 18:59 -0700
      Re: [Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 19:14 -0700
        Re: [Python 2.7.3] What's the difference between these two uses of "for"? Dave Angel <davea@davea.name> - 2013-03-18 07:38 -0400
      Re: [Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 19:14 -0700
        Re: [Python 2.7.3] What's the difference between these two uses of "for"? Roy Smith <roy@panix.com> - 2013-03-17 22:33 -0400
          Re: What's the difference between these two uses of "for"? alex23 <wuwei23@gmail.com> - 2013-03-18 18:08 -0700
        Re: [Python 2.7.3] What's the difference between these two uses of "for"? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-18 02:44 +0000
          Re: [Python 2.7.3] What's the difference between these two uses of "for"? Roy Smith <roy@panix.com> - 2013-03-17 22:51 -0400
  Re: [Python 2.7.3] What's the difference between these two uses of "for"? Roy Smith <roy@panix.com> - 2013-03-17 21:28 -0400
    Re: [Python 2.7.3] What's the difference between these two uses of "for"? "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-03-17 19:01 -0700
      Re: [Python 2.7.3] What's the difference between these two uses of "for"? Roy Smith <roy@panix.com> - 2013-03-17 22:28 -0400
  Re: [Python 2.7.3] What's the difference between these two uses of "for"? Terry Reedy <tjreedy@udel.edu> - 2013-03-18 00:37 -0400

csiph-web