Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url:launchpad': 0.05; 'subject:How': 0.10; 'from:addr:swing.be': 0.16; 'from:addr:vincent.vandevyvre': 0.16; 'from:name:vincent vande vyvre': 0.16; 'message-id:@swing.be': 0.16; 'oqapy': 0.16; 'paqager': 0.16; 'received:mobistar.be': 0.16; 'url:oqapy': 0.16; 'url:paqager': 0.16; 'url:qarte': 0.16; 'v.v.': 0.16; 'values:': 0.16; '\xe9crit': 0.16; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'sets': 0.30; 'subject:?': 0.36; 'needed': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:this': 0.83; 'ana': 0.84 Date: Mon, 01 Apr 2013 12:58:27 +0200 From: Vincent Vande Vyvre User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: How to do this? References: <83a54022-576d-465b-b6bd-7e21cde59d99@googlegroups.com> In-Reply-To: <83a54022-576d-465b-b6bd-7e21cde59d99@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364813918 news.xs4all.nl 6959 [2001:888:2000:d::a6]:36427 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42452 Le 01/04/13 12:14, Ana Dionísio a écrit : > for t in range(20): > if t == 4: > vt[t]=1 Sets only the needed values: for t in range(4, 8): vt[t]=1 -- Vincent V.V. Oqapy . Qarte . PaQager