In [4]: phrases = ("Hello There\nHow are you") In [5]: type(phrases) Out[5]: builtins.str
我在ipython中试过这个,你看,(“hello there\nhow are you”)是字符串而不是元组。
print(["Hello there\nHow are you"]) 不会真正打印出字符串,它只是告诉您列表中的内容。
print(["Hello there\nHow are you"])