如何在字符串中粘贴IntelliJ + Python插件中的文本块?

时间:2016-10-27 15:27:50

标签: python intellij-idea pycharm

我有一个文本块,我想把它放在一个字符串中。当我粘贴文本时,我得到:

hello = "This paragraph forms
a block of text, which
can be short like this,
or extremely long!"

Python中哪个错误。有什么窍门吗?我正在使用带有Python插件的IntelliJ 2016.02社区。

1 个答案:

答案 0 :(得分:1)

使用换行符:

mizzao:user-status

没有换行符

>>> hello = '''
... This paragraph forms
... a block of text, which
... can be short like this,
... or extremely long!'''
>>> print(hello)

This paragraph forms
a block of text, which
can be short like this,
or extremely long!
>>>