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.045 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'problem:': 0.07; 'input,': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'subject:Issue': 0.19; 'thu,': 0.19; 'compare': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'membership': 0.31; 'requests': 0.31; 'another': 0.32; 'proceed': 0.33; 'test': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'basis.': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'first': 0.61; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=GnvvsGj8ihVprRXDBbcdXzkxY6RCMAuk81zkiTivhgA=; b=ajGIlzsuBpRvQP8L1Go3zWGcqzD/dudUdUUNRYYGMetn9KGOFqJ7cWKE+vdp7VxDYS e+nMBdIkv6ojo5+fqp4+LS4ADAZ1m8plOLeyxKesPhMpxndTjyIPDg4VkI7+uuk6oLQ2 9DQBs2Tj+RA7GVqiLrrrAkORIBCeVDLRDzJGAvcsBxFqgM5J932kzCyz7DBpiRrv314y m0crQ5RutjmRg2ijDAud+E4kvPMpnwHVOC52vY4kkPtWa6f3rRlJw/o9v+gnVkpzQl3T +K78zlfT9U0cOQ3mneUmavWIb5vlP/tJeYZ6qpCIsrwqhARkmbdMqI48E1NkF6TCM8ZQ DjbA== MIME-Version: 1.0 X-Received: by 10.52.37.109 with SMTP id x13mr6544174vdj.10.1366275968953; Thu, 18 Apr 2013 02:06:08 -0700 (PDT) In-Reply-To: References: <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com> Date: Thu, 18 Apr 2013 19:06:08 +1000 Subject: Re: Novice Issue From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366275971 news.xs4all.nl 2188 [2001:888:2000:d::a6]:52653 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43812 On Thu, Apr 18, 2013 at 6:58 PM, Wolfgang Maier wrote: > There are two solutions for that: > the obvious: while not (raw_input == "quit" or raw_input == "q") That has another problem: Once that's changed to raw_input() so it actually requests input, it will do so twice, compare the first line against "quit" and the second against "q", and proceed on that basis. The membership test raw_input() in ("quit","q") is going to be far better. ChrisA