Whats the use of "" and difference between ' ' in print statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Whats the use of "" and difference between ' ' in print statement?

8th Mar 2020, 4:20 AM
SB Sharam
SB Sharam - avatar
3 Answers
+ 5
"this is a string" 'this is another string' https://www.sololearn.com/Discuss/446544/?ref=app
8th Mar 2020, 4:28 AM
Kevin ★
+ 2
There's no difference. They can be used when you want a quotation marks in the string. If we want to take this sentence as string He said, "Your answer is right!". Then we will use single quotation marks because the double quotation marks are used in the sentence x = ' He said, "Your answer is right" ' And if I want to take the word That's as a string then we can use double quotation marks as single quotation mark is in the word y = " That's " You can also do this without using two types of quotation marks by using \. y = ' That\'s '
8th Mar 2020, 7:16 AM
Utkarsh Sharma
Utkarsh Sharma - avatar
0
Thx dear
8th Mar 2020, 7:17 AM
SB Sharam
SB Sharam - avatar