Python 3: receive user input including newline characters

Posted by Beau Martínez on Stack Overflow See other posts from Stack Overflow or by Beau Martínez
Published on 2010-03-30T00:37:11Z Indexed on 2010/03/30 0:43 UTC
Read the original article Hit count: 551

Filed under:
|
|

I'm trying to read in the following text from the command-line in Python 3 (copied verbatim, newlines and all):

lcbeika
rraobmlo
grmfina
ontccep
emrlin
tseiboo
edosrgd
mkoeys
eissaml
knaiefr

Using input, I can only read in the first word as once it reads the first newline it stops reading.

Is there a way I could read in them all without iteratively calling input?

© Stack Overflow or respective owner

Related posts about python

Related posts about python-3.x