# ヒアドキュメントで代入 text = """\ This is a example \ of here document.""" print text # This is\na example of here document.
# 先頭にタブと空白、末尾に改行がある文字列の例 text = "\t strip\n" # 先頭と末尾の空白文字の削除 print text.strip() #=> strip