Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49601
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <davea@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'else:': 0.03; 'subject: -- ': 0.07; 'string': 0.09; 'clause': 0.09; 'logic': 0.09; 'referenced': 0.09; 'run,': 0.09; 'runtime': 0.09; 'subject:extra': 0.09; 'subject:string': 0.09; 'subject:question': 0.10; 'def': 0.12; 'question.': 0.14; '#this': 0.16; 'digits.': 0.16; 'iterating': 0.16; 'means.': 0.16; 'scope,': 0.16; 'spacing': 0.16; 'subject: \n ': 0.16; 'subject:when': 0.16; 'subject:python': 0.16; 'skip:# 20': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'later': 0.20; 'cc:addr:gmail.com': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'errors.': 0.24; 'skip:l 30': 0.24; 'fine': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'skip:" 30': 0.26; 'pass': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'bigger': 0.30; 'subject:list': 0.30; 'asked': 0.31; 'code': 0.31; 'comments': 0.31; 'lines': 0.31; 'probably': 0.32; 'skip:# 10': 0.33; 'subject:the': 0.34; 'add': 0.35; "i'll": 0.36; 'should': 0.36; 'list': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'dave': 0.60; 'skip:n 30': 0.60; 'subject:back': 0.60; 'numbers': 0.61; 'first': 0.61; 'july': 0.63; 'skip:n 10': 0.64; 'more': 0.64; 'note:': 0.66; 'due': 0.66; 'between': 0.67; 'believe': 0.68; 'yes': 0.68; 'received:74.208': 0.68; 'authentic': 0.84; 'presumably': 0.84; 'received:74.208.4.194': 0.84; 'subject:space': 0.84; "they'd": 0.84; 'we.': 0.84; 'angel': 0.91; 'rusi': 0.91; '"white': 0.93; '2013': 0.98 |
| Date | Mon, 01 Jul 2013 21:11:32 -0400 |
| From | Dave Angel <davea@davea.name> |
| 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 | <CAPM-O+wAZ2R2Mz_P=1uC4kMjJ3o8CiqQu-AM1=fPL5=C-9==Kw@mail.gmail.com> <mailman.4084.1372708982.3114.python-list@python.org> <cf9d580b-0f31-44cc-9c68-c5d9d7c7381d@googlegroups.com> |
| In-Reply-To | <cf9d580b-0f31-44cc-9c68-c5d9d7c7381d@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:rPtc5NfoIoHTIgrsDKe+X1rdfhmFUy0LmMzrK27ZRC1 LMcQ35bpdyz4cyfKaUj8l2pNUj24UD+IXOzG6WEpl0NjtPC3GS BvrSUMG64kTOY3P8r/rpCjaU7Q5ryZf4Ef4NCAQMxiomLntBj7 jJEPNw3j5DUNwlyMe7HMb8jP9fnd1+qAYkK598sLH3okhuYhSC Htn1M8E11bx51ZaNwjh+DzMvaQ5ZDP51/YP6xxqoi+nOui/XLi lQgyEsZWECKbvW+kNWf2ja5VC7CeLO9fXbB8/no9ZOOTl6YKS+ 2o3/XGDY82I7UAgHP8QtInYdYFxFfvhTTwDjPDnCppqxJC6gpV +BUUaMoopgbijwc8HmIs= |
| Cc | feather.duster.kung.fu@gmail.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4086.1372727513.3114.python-list@python.org> (permalink) |
| Lines | 77 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1372727513 news.xs4all.nl 15865 [2001:888:2000:d::a6]:46663 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:49601 |
Show key headers only | View raw
On 07/01/2013 05:16 PM, rusi wrote:
> On Tuesday, July 2, 2013 1:32:44 AM UTC+5:30, Dave Angel wrote:
>> <SNIP>
>
> Yes in this specific instance all this is probably true.
> I believe however, that Joel's intent in reposting this is more global (and important) in its scope, viz:
>
> If this list persists in the current unhealthy state which it is experiencing, authentic noob questions will get buried in mountains of bullshit.
>
> Note: I find Joshua's answer fine given the question.
>
>> If the OP has abandoned it, so should we.
>
> If you were a noob-OP who asked that question and the result unfolded as it has, what would you do?
>
Point well-taken. So I'll see what I can do here. I'll put comments on
lines I had to add or change.
finale_line = [] #missing initialization
lot_number = 99
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 #not referenced
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:
pass
#print(" "*(a[b]-space_count)),a[b], #dead code
#space_count=a[b]+1 #dead code
Since all the numbers are butted together in the string line_out, the
later logic is iterating over digits, which cannot be bigger than 9. So
the else clause is nonsensical. Even if they were to run, they'd give
runtime errors.
> #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.#
No clue what that means. What numbers are between what lines? And what
is a normal print?
Presumably the intent was to somehow do a variable spacing of those digits.
--
DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: python adds an extra half space when reading froma string or list -- back to the question Dave Angel <davea@davea.name> - 2013-07-01 16:02 -0400
Re: python adds an extra half space when reading froma string or list -- back to the question rusi <rustompmody@gmail.com> - 2013-07-01 14:16 -0700
Re: python adds an extra half space when reading froma string or list -- back to the question Dave Angel <davea@davea.name> - 2013-07-01 21:11 -0400
csiph-web