我想知道为什么下面的第二个打印语句不会删除\n输出但第一个打印语句.
\n
str1 = "Line1-abcdef \nLine2-abc \nLine4-abcd \ndfsdf" print (str1.split( )) print (str1.split(' ', 2))
python split python-3.x
python ×1
python-3.x ×1
split ×1