Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11
""" if you're lazy you can just do this """
17th Apr 2017, 8:19 AM
Ahri Fox
Ahri Fox - avatar
+ 7
"Tinashe"
17th Apr 2017, 7:25 AM
Meharban Singh
Meharban Singh - avatar
+ 6
Envelop the double quotes in single quotes for the former to be printed out. print('Sam "Tinashe" Truscott') >>> Sam "Tinashe" Truscott
17th Apr 2017, 7:44 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
"like this"
17th Apr 2017, 7:09 AM
Didi Georgel Danaila
Didi Georgel Danaila - avatar
+ 3
You can also use \ (backslash) as an escape character for double quotes. Example (Python): print("Hello \"World\"") Output: Hello "World" -Note that I'm only using double quotes and this is possible because I used the backslash to escape those two double quote characters. Here's a list of things you can do with backslash in your strings: \' single quote \" double quote \\ backslash \n new line \r carriage return \t tab \b backspace \f form feed -Read up on escaping characters for more info
17th Apr 2017, 8:31 AM
Ghauth Christians
Ghauth Christians - avatar
+ 1
Gavin's explanation helped me to guess it... :) Very interesting way to write stuff... I enjoy this.
19th May 2017, 5:40 AM
Imagined Self
Imagined Self - avatar
0
Rather than 'blah blah blah' double quote is "blah blah blah"
19th Apr 2017, 2:03 AM
Josie
Josie - avatar