Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'else:': 0.03; 'subject: -- ': 0.07; 'subject:extra': 0.09; 'subject:string': 0.09; 'subject:question': 0.10; 'def': 0.12; 'thread': 0.14; 'posted': 0.15; '#this': 0.16; 'output?': 0.16; 'received:74.208.4.195': 0.16; 'sense,': 0.16; 'subject: \n ': 0.16; 'subject:when': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'print': 0.22; 'header :User-Agent:1': 0.23; 'copied': 0.24; 'skip:l 30': 0.24; 'question': 0.24; 'compare': 0.26; 'skip:" 30': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'subject:list': 0.30; 'code': 0.31; 'lines': 0.31; 'subject:the': 0.34; 'but': 0.35; 'should': 0.36; 'list': 0.37; 'expected': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'skip:n 30': 0.60; 'subject:back': 0.60; 'numbers': 0.61; 'first': 0.61; 'skip:n 10': 0.64; 'number:': 0.66; 'due': 0.66; 'between': 0.67; 'received:74.208': 0.68; 'subject:space': 0.84; 'we.': 0.84; 'continue.': 0.91; 'joel': 0.91; '"white': 0.93 Date: Mon, 01 Jul 2013 16:02:44 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: python adds an extra half space when reading froma string or list -- back to the question References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:A0V/Dt+dZYhyUaemUM/uB/1kVRdh1f8dmsbiuS0/fxu t0bZbH6qoHvwSFsRhgBtDHrulzPF+J8RxKecLSgFlCeQwqw8U4 v04P4pJTdd+YRslsm7OFyBQ6znyeiE6lGcPr4KfhfMO5UCmxx2 d01/70QCsqRnZ8E/rOSIryvPMmZtirPgHKZjRiLbjIlmSmLTr+ 3W4IQaldm4uKW0QhwM3/KIu1lxlxXaCnnwoQQ863MTCBDWmtEz BSV2nFhPYMIbimQwM1bnvBB/qzNcLiqNVH3NQj/55wvA2drvRL Rq2p3qJmDQDa20kZDdehcKmGhOVBmHhg4CXxelBZ03QvMbx/Ng xI9DRdQddXDCOd4Ndw18= 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: 89 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372708982 news.xs4all.nl 15997 [2001:888:2000:d::a6]:42420 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49592 On 07/01/2013 03:32 PM, Joel Goldstick wrote: > I copied the original question so that the rant on the other thread > can continue. Let's keep this thread ontopic > > > number_drawn=() > def load(lot_number,number_drawn): > first=input("enter first lot: ") > last=input("enter last lot: ") > for lot_number in range(first,last): > line_out=str(lot_number) > for count in range(1,5): > number_drawn=raw_input("number: ") > line_out=line_out+(number_drawn) > print line_out > finale_line.append(line_out) > finale_line2=finale_line > > load(lot_number,number_drawn) > > > print finale_line > print(" "*4), > for n in range(1,41): > print n, #this is to produce a line of numbers to compare to > output# > for a in finale_line: > print"\n", > print a[0]," ", > space_count=1 > for b in range(1,5): > if int(a[b])<10: > print(" "*(int(a[b])-space_count)),int(a[b]), > space_count=int(a[b]) > else: > print(" "*(a[b]-space_count)),a[b], > space_count=a[b]+1 > > > > > > > > > > > > > this generates > > enter first lot: 1 > enter last lot: 4 > number: 2 > number: 3 > number: 4 > number: 5 > 12345 > number: 1 > number: 2 > number: 3 > number: 4 > 21234 > number: 3 > number: 4 > number: 5 > number: 6 > 33456 > ['12345', '21234', '33456'] > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 > 27 28 29 30 31 32 33 34 35 36 37 38 39 40 > 1 2 3 4 5 > 2 1 2 3 4 > 3 3 4 5 6 >> #as you can see many numbers are between the lines of a normal print# > #I thought this was due to "white space" int he format .So I tried a list > of strings and got the same results.# > But what was the expected output? And who cares? The code made no sense, was incomplete, and the posted question was nonsensical. If the OP has abandoned it, so should we. -- DaveA