我目前正在参加python课程.当谈到他们讲述的转义序列时,"\n"它用于在新行中打印字符串.但是当它以下列方式使用时,为什么我会得到不同的输出
"\n"
>>> st = "Hello\nWorld" >>> st 'Hello\nWorld'
但如果我这样做
>>> print st Hello World
python string python-2.7 python-3.x
python ×1
python-2.7 ×1
python-3.x ×1
string ×1