Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.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.138 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.73; '*S*': 0.00; 'string': 0.09; '#empty': 0.16; 'received:74.208.4.195': 0.16; 'wrote:': 0.18; 'subject:Issue': 0.19; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'wright': 0.31; 'another': 0.32; 'call.': 0.33; "i'd": 0.34; 'but': 0.35; 'add': 0.35; 'thanks': 0.36; 'list': 0.37; 'list.': 0.37; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'to:addr:python.org': 0.39; "you've": 0.63; 'finish': 0.65; 'prompt': 0.68; 'received:74.208': 0.68; 'examine': 0.93 Date: Thu, 18 Apr 2013 08:29:37 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Novice Issue References: <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com> <36c94c5e-6ad1-4aba-b18c-61cf14cf102c@googlegroups.com> In-Reply-To: <36c94c5e-6ad1-4aba-b18c-61cf14cf102c@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:FEW3rmQvENUUcj04l4fSZLPEEdfKl5xG70Arwq5w4OU ch6Q6ZHpieW+X7P4z+/lBvDPISSle4FwmBiljCEYVChODP0DSB g/gtGBy+Bwp17plH5mGm+5sWtu/rWUfKHKSUiph9H0G6GM14L1 K6M0q3UJNLryVcllibbT6Tb37TMIrEZ9i4RS0b2qaKOOOoZppn rIVU9uFFclOwObxltOzHJlgpAgBhK8ut+D+NsDL4XRTasBVDJ8 3J738E5hf+P2JfiJ8jHboDkApO8BGtfh6vamnHAPxQJJVc1y0i 6j+yuBZ8/4uCNRK/z8ktkqanHCWEAlEsaAByeTsQ1nsPdnjSA= = 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: 1366288199 news.xs4all.nl 2242 [2001:888:2000:d::a6]:38525 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43820 On 04/18/2013 08:18 AM, Bradley Wright wrote: > > >> > Secondly, thanks Wolfgang > while raw_input not in ("quit", "q") - genius, i get your point clearly But you have to combine his point with Chris's, don't forget the parens on the call to raw_input. And if it were I, I'd also put a prompt string in the call. while raw_input("q to quit") not in ("quit", "q"): > If you've got a list, and each time through you want to add some item(s) to a list, you can use the following idiom: result = [] #empty list for whatever in something: value = another result.append(value) Then when you finish the list, you can examine the whole list. -- DaveA