サーバレス練習帳

着眼大局着手小局

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

www23.atwiki.jp

 

(引用)

 

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