C
candide
Suppose you have to put into a Python string the following sentence :
The play "All's Well That Ends Well" by Shakespeare
It's easy do it :
The play "All's Well That Ends Well" by Shakespeare
Now, change the sentence to this one :
The play "All's Well That Ends Well"
Using triple single quotes works fine
The play "All's Well That Ends Well"
But the first method doesn't run correctly :
File "<stdin>", line 1
print """The play "All's Well That Ends Well""""
^
SyntaxError: EOL while scanning single-quoted string
Any comment ?
The play "All's Well That Ends Well" by Shakespeare
It's easy do it :
The play "All's Well That Ends Well" by Shakespeare
Now, change the sentence to this one :
The play "All's Well That Ends Well"
Using triple single quotes works fine
The play "All's Well That Ends Well"
But the first method doesn't run correctly :
File "<stdin>", line 1
print """The play "All's Well That Ends Well""""
^
SyntaxError: EOL while scanning single-quoted string
Any comment ?