が参考になりました。 以下のように書くとインデントと前後の改行を無視してくれる。 もっとすんなり書ければいいけど。。
import textwrap string = textwrap.dedent(''' This is a {what}. I'm from {where}. ''').format(what="apple", where="Chiba").strip()
が参考になりました。 以下のように書くとインデントと前後の改行を無視してくれる。 もっとすんなり書ければいいけど。。
import textwrap string = textwrap.dedent(''' This is a {what}. I'm from {where}. ''').format(what="apple", where="Chiba").strip()