Why Are There No Backslashes Here?


#1

Hey

in line number 4

print "Let's not go to %s. 'Tis a silly %s." % (string_1, string_2)

why there is no need for back slash next to the words 'let’s" and “'tis”?
Also, when I change it from " " to ’ ', still, there is no need for back slash.

Thanks!


How do I insert multiple variables with string formatting?
#2

given the string is enclosed in quotation marks, apostrophes do not need to escaped. Given they won’t end the prematurely.

but if you enclosed the string in apostrophes, the apostrophes inside the string need to be escaped, otherwise the string would end too early