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

Tim Chase tim at thechases.com
Wed Dec 4 17:07:41 CET 2013


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






More information about the Python-list mailing list