Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; "'a'": 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'typed': 0.09; "'b',": 0.16; 'email addr:comcast.net': 0.16; 'loop.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'help.': 0.21; 'code,': 0.22; 'header:User- Agent:1': 0.23; 'question': 0.24; 'header:X-Complaints-To:1': 0.27; 'thus': 0.29; 'code': 0.31; "skip:' 10": 0.31; 'once,': 0.31; 'post.': 0.31; 'subject:with': 0.35; 'there': 0.35; 'returning': 0.36; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'example,': 0.37; 'clear': 0.37; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'kind': 0.63; 'subject:letter': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: Replace blanks with letter Date: Tue, 20 Aug 2013 21:54:11 +0000 (UTC) References: <2bdbd16f-a676-4973-9866-db93b1b9cd9b@googlegroups.com> <102afb35-1c8d-4957-9e9c-14b17429437b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 174.32.174.30 User-Agent: XPN/1.2.6 (Street Spirit ; Linux) 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1377035672 news.xs4all.nl 15886 [2001:888:2000:d::a6]:45445 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52746 eschneider92@comcast.net wrote: > Is there also a way to have the code remember what I typed and not stop after the first letter the user types? For example, if I typed 'a' once, thus returning 'a______', and then typed in 'b', I want the code to return 'ab_____' and so on. I wasn't clear about this part in my original post. Thanks for the help. First you need some kind of loop. There's only one call to input() in your present code, so the question is meaningless. Roughly speaking, make sure the following line is NOT in your loop: blanks='_ '*len(letters) -- DaveA