what is a double quote string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is a double quote string?

11th Sep 2016, 12:58 PM
Emilio Fernandes
Emilio Fernandes - avatar
3 Answers
+ 6
Having 2 characters to create strings helps you to avoid using extra escape "\" characters. For example, if your string contains possessive nouns or contractions, it is easier to create the string with the double quotes. On the other hand, if your intention is to print quoted text as it would appear in a book, create the text with the single quotes. If you need to do both in the same string, take your pick and you will need the escape character when the quote or double quote matches your choice for creating the string.
11th Sep 2016, 7:19 PM
Frank Columbus
+ 3
print("This is a double quote string") print('This is a quote string')
11th Sep 2016, 1:13 PM
Alexandre Balea
Alexandre Balea - avatar
0
NJ
12th Sep 2016, 3:20 AM
Emilio Fernandes
Emilio Fernandes - avatar