Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'skip:[ 20': 0.04; 'output': 0.05; 'none,': 0.07; 'subject: [': 0.09; 'subject:None': 0.09; '[none,': 0.16; 'none]': 0.16; '>>>': 0.22; '>>>': 0.24; 'message-id:@mail.gmail.com': 0.30; 'skip:! 10': 0.31; 'subject:the': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'subject:]': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:have': 0.80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tCXPna/jR8B4p5jP2+S892lZyziZFOTqOdFT3i73EfE=; b=oA8sTJOJKVoHhhs0wnf7xUcF+qNeAR3xsEvpkdOKMrM8tKRWxAW6M/p97HOubN+ToD m1DA3Yn9FvaNDThlgppXfOKwKPyRiNPse9b7nW62/weLutHzOj7POEu9/VAlYyql9Iow 7nXOaA91nKMzyfD6GvSy8+MQZ0P9KC2DLCZSp6Cwx3vWtCOaIQ5IrQILTMbgq6SlfWBQ JHJg2+iom4BPB28AudhZ+mSmUxmAVoNo3/s3EtgUlgjFieglZNzPhoyRYpVFHUhCf/l6 N0u+7ObCLJVw8cTdlgvItmfvEt/zmzicngpmxpaDmC5IYufMyETYTUtGXkkil5XtSY0+ JTEQ== MIME-Version: 1.0 X-Received: by 10.152.197.98 with SMTP id it2mr1296885lac.53.1397138080955; Thu, 10 Apr 2014 06:54:40 -0700 (PDT) Date: Thu, 10 Apr 2014 21:54:40 +0800 Subject: why i have the output of [None, None, None] From: length power To: python-list@python.org Content-Type: multipart/alternative; boundary=001a113441ae04802604f6b08fd4 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1397138088 news.xs4all.nl 2954 [2001:888:2000:d::a6]:35271 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70037 --001a113441ae04802604f6b08fd4 Content-Type: text/plain; charset=ISO-8859-1 >>> x=['','x1','x2','x3',' '] >>> x ['', 'x1', 'x2', 'x3', ' '] >>> [print("ok") for it in x if it.strip() !=""] ok ok ok [None, None, None] i understand there are three 'ok' in the output,but why i have the output of [None, None, None] --001a113441ae04802604f6b08fd4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
>>> x=3D['','x1','x2'= ;,'x3','=A0=A0 ']
>>> x
['', 'x1= ', 'x2', 'x3', '=A0=A0 ']
>>> [prin= t("ok") for it in x if it.strip() !=3D""]
ok
ok
ok
[None, None, None]

i understand there are th= ree 'ok' in the output,but why i have the output of [None, None, No= ne]
--001a113441ae04802604f6b08fd4--