0
Quotes
How to write a statement quote of a third party without a syntax error. Eg, Mr John's brother said " are you happy?" I need the print statement
3 Réponses
+ 8
Inside of "" you have to escape another " in order not to close the quotation and instead print a literal ". So for example:
print("Mr. John's brother said \"are you happy?\"")
I believe you can use single quotations literally without escaping inside of double quotes, and vice versa:
print('Mr. John\'s brother said "are you happy?"')
+ 2
ρү૨œdԌ૨ × thanks alot. You solved my problem
+ 1
You're welcome 😀