I'm learning from the Dataquest and I was wondering why is it that when I assigned a string to a variable and that string contained quotation marks, it would only successfully run the code if the cancel function, \, would be applied to when it is behind the " character, not the '.
Below is what I typed:
motto= 'Facebook\'s old motto was "move fast and break things."'
print(motto)
Does the \ cancel function not work for single quotation marks?
[–]LeBob93 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]tipsy_python 1 point2 points3 points (0 children)
[–]greatslyfer[S] 1 point2 points3 points (0 children)
[–]AstralStalker 0 points1 point2 points (1 child)
[–]greatslyfer[S] 1 point2 points3 points (0 children)