Does it matter if u use " or ' in a normal string?Whats the difference and if so when should i use which? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Does it matter if u use " or ' in a normal string?Whats the difference and if so when should i use which?

31st Mar 2021, 8:54 PM
JustNobody
4 Answers
+ 2
Actually, (‘This is Mr.bean's pen’) will work just fine. You just need to eacape the apostrophe print (‘This is Mr. Bean\’s pen’)
31st Mar 2021, 11:26 PM
JediMastrBob
JediMastrBob - avatar
+ 1
Ok so it doesn't matter only 1 exception good ty
31st Mar 2021, 9:10 PM
JustNobody
+ 1
Just like flora said but the single qoute would be included in the output. Probably a typo. If you want to include the same type of qoutation marks inside the string you can use the escape character \ before the qoutation. :)
31st Mar 2021, 9:10 PM
Alexander Crum
Alexander Crum - avatar
+ 1
Ohh ye that even quicker
31st Mar 2021, 9:12 PM
JustNobody