字符串和Print(String)之间的区别

时间:2019-07-10 08:24:34

标签: python string function printing

>>> str4 = """This too
... is a multiline one
... built with triple double-quotes."""

>>> str4 #A
'This too\nis a multiline one\nbuilt with triple double-quotes.'

>>> print(str4) #B
This too
is a multiline one
built with triple double-quotes.

在#A和#B中,我们先隐式地打印str4,然后使用print函数显式地打印。

为什么输出不同?

0 个答案:

没有答案