Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61031

Re: Input without line break, is it possible? [correction]

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <tim@thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.063
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'python': 0.11; '-tkc': 0.16; 'from:name:tim chase': 0.16; 'subject:break': 0.16; 'subject:possible': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'bit': 0.19; 'coding': 0.22; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'chase': 0.31; 'could': 0.34; 'something': 0.35; 'charset:us- ascii': 0.36; 'should': 0.36; 'subject:]': 0.38; 'to:addr:python- list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'more': 0.64; 'received:50.22': 0.84; 'inbox': 0.93
Date Wed, 4 Dec 2013 10:07:41 -0600
From Tim Chase <tim@thechases.com>
To python-list@python.org
Subject Re: Input without line break, is it possible? [correction]
In-Reply-To <20131204095543.3b4269d8@bigbox.christie.dr>
References <6f831d02-26bf-4e68-a1c6-a9c9e87db1dc@googlegroups.com> <20131204095543.3b4269d8@bigbox.christie.dr>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3570.1386173184.18130.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386173184 news.xs4all.nl 2863 [2001:888:2000:d::a6]:43380
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61031

Show key headers only | View raw


On 2013-12-04 09:55, Tim Chase wrote:
> You could make it a bit more robust with something like:
> 
>   answers = []
>   while len(answers) < 8:
>     s = input()
>     answers.append(s.split())

this should be

  answers.extend(s.split())

instead of .append()

That's what I get for coding in my inbox rather than copy/pasting
from tested Python code.

-tkc


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Input without line break, is it possible? geezle86@gmail.com - 2013-12-04 07:38 -0800
  Re: Input without line break, is it possible? Tim Chase <python.list@tim.thechases.com> - 2013-12-04 09:55 -0600
  Re: Input without line break, is it possible? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-04 16:04 +0000
  Re: Input without line break, is it possible? [correction] Tim Chase <tim@thechases.com> - 2013-12-04 10:07 -0600
  Re: Input without line break, is it possible? Chris Angelico <rosuav@gmail.com> - 2013-12-05 03:14 +1100
  Re: Input without line break, is it possible? Michael Torrie <torriem@gmail.com> - 2013-12-04 09:23 -0700
  Re: Input without line break, is it possible? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-04 16:27 +0000
  Re: Input without line break, is it possible? Chris Angelico <rosuav@gmail.com> - 2013-12-05 03:33 +1100
  Re: Input without line break, is it possible? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-04 16:36 +0000
  Re: Input without line break, is it possible? Michael Torrie <torriem@gmail.com> - 2013-12-05 08:21 -0700

csiph-web