複数行の文字列を1行ずつ処理する

www23.atwiki.jp

 

(引用)

 

>>> s = """Hello
... and
... How are you ?"""
>>> for line in s.splitlines():
line