Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.139 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.75; '*S*': 0.03; 'elif': 0.05; 'cc:addr :python-list': 0.11; 'fails.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'yields': 0.31; 'url:python': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'so,': 0.37; '12,': 0.39; 'url:mail': 0.40; 'course': 0.61; '8bit%:100': 0.72; 'how.': 0.84; 'subject:gets': 0.84; 'to:addr:support': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=KHJ3QdHYImnJNCGn1miR009X/6NjC/b4HxZfkzILIyQ=; b=Iwwn5J7wYlBaAxeDhim3BdTg0nDyiVJm0YXEU/xOacteo9rHcRnBV7Vnysb4YuTqPe jY9FwaRJ/1HxyuW8FVAjekeM56hNoQGU6CxaGHrbrCkTDSOerLDKf0ebG85OXD/xiO7O HWKtvHuOmTaKpeOy5kKOAUh8iAaFHELyVMrni4CLCHJMKfhFZn/uKrA2z00iQ7gga2YY HY/LUk9NMSDmAbj87n9qhQHaNKCrQHBJpS9ON6xR17KUUCw0Gnrd8BaTVmyWBqqy+V99 NmyYmcbJCbLhD7LsGcsYwrB9pMkya39UCcrtgdc9IowUq7r725wjbQU3GPN8QlQXzUGA NX+g== MIME-Version: 1.0 X-Received: by 10.49.107.2 with SMTP id gy2mr22264227qeb.21.1371028059731; Wed, 12 Jun 2013 02:07:39 -0700 (PDT) In-Reply-To: References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> Date: Wed, 12 Jun 2013 10:07:39 +0100 Subject: Re: A certainl part of an if() structure never gets executed. From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: =?ISO-8859-7?B?zenq/Ovh7/Igyu/98eHy?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "python-list@python.org" 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371028068 news.xs4all.nl 15902 [2001:888:2000:d::a6]:55214 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47761 On Wed, Jun 12, 2013 at 9:54 AM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF= =CF=82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82 wrote: > but if enumerate yields 0 instead of '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' the= n elif '=3D' not in > year of course fails. > > So, i must tell: > > for i, month in enumerate(months): > print('' % (i, month) ) > > to somehow return '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' instead of 0 but don't= know how. > -- > http://mail.python.org/mailman/listinfo/python-list Well, you could try this: > for i, month in enumerate(months): > if i =3D=3D 0: > month =3D ('=3D' * 10) > print('' % (i, month) ) No? -- F=C3=A1bio Santos