Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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.013 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'else:': 0.03; 'elif': 0.05; 'subject:Why': 0.09; 'python': 0.11; "'no',": 0.16; "'yes',": 0.16; 'loop.': 0.16; 'subject: \n ': 0.16; 'subject:run': 0.16; 'subject:under': 0.16; 'subject:when': 0.16; 'true:': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'thanks.': 0.20; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'asks': 0.31; 'continues': 0.31; 'sep': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'break': 0.61; 'subject:have': 0.80; 'william': 0.81; 'novice': 0.91; 'old.': 0.93; '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:from:date:message-id:subject:to :content-type; bh=tkwlUbCRYaywssUUs5HSyZy7+PScJFhcImiLKuLdhNE=; b=p/bQiTG5GP18h8BY20x6cEvBEo+6caRJ2PQLrQnJnzdSDspyszbDWl1TT1+yK6M7m5 VtUDM3ieehY2UM4wTgRhSzccb2aOiKgL+QlFUHAAYKuZbaCng0F/+qXHByEAqgBBKFp/ LAH/tzlJgNsEag5+CYdc7FqofFXwzKfacjqzYiVSj5RW2a9/6k021ETEXODD3r8FdcG7 LRcGnLD+Qmaij5ya0xSwen+INM+go6Ftjxc5AWvh7dVPHiyGI2Et8CuvlMjWss9ZmYDA RctvQf0jzgrITwGCarSOj9jmxTQUCgySDqw6IGgd3i6uGvIh2SQNNT0uVJgzSQ626QJJ qRTg== X-Received: by 10.66.234.131 with SMTP id ue3mr5232373pac.35.1379632183758; Thu, 19 Sep 2013 16:09:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <22b99b0a-598f-4500-9de9-5041c2ce2c8f@googlegroups.com> From: Ian Kelly Date: Thu, 19 Sep 2013 17:09:03 -0600 Subject: Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? To: Python 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379632193 news.xs4all.nl 16010 [2001:888:2000:d::a6]:56337 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54453 On Thu, Sep 19, 2013 at 1:22 PM, William Bryant wrote: > It was the other functions above it. Thanks. but I tried to do the while > loop - I don't think I did it right, I am novice in python and I am 13 years > old. It should be structured like this: while True: answer = input("Enter yes/no:") if answer in ('y', 'yes', 'new list'): do_yes_stuff() break elif answer in ('n', 'no', 'close'): do_no_stuff() break else: print("Please enter y or n.") If they answer 'yes' or 'no', then the break statement breaks out of the while loop. Otherwise the while loop continues from the top and asks them again.