2013-11-26 4 views

答えて

8

これは、バックスラッシュに直接続く改行をPythonが無視するように指示します。得られた文字列がない\nContent-Type:で、Content-Type:で始まる2つの結果は、異なる方法

>>> '''\ 
This is the first line. 
This is the second line. 
''' 
'This is the first line.\nThis is the second line.\n' 
>>> ''' 
... This is the first line. 
... This is the second line. 
... ''' 
'\nThis is the first line.\nThis is the second line.\n' 

注意。最初の文字は最初に\n改行文字がありません。