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]

Date 2013-12-04 10:07 -0600
From Tim Chase <tim@thechases.com>
Subject Re: Input without line break, is it possible? [correction]
References <6f831d02-26bf-4e68-a1c6-a9c9e87db1dc@googlegroups.com> <20131204095543.3b4269d8@bigbox.christie.dr>
Newsgroups comp.lang.python
Message-ID <mailman.3570.1386173184.18130.python-list@python.org> (permalink)

Show all headers | 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