+ 1

Read My Message

We Can Put " instead of ' when you use \ For Example: print("Brian\'s mother: He\'s not the Messiah. He\'s a very naughty boy!") it will be Brian's mother: He's not the Messiah. He's a very naughty boy! instead of Using \

2nd Jun 2017, 7:42 PM
MessWarning22
MessWarning22 - avatar
6 odpowiedzi
+ 17
Read It. That should be the correct answer
2nd Jun 2017, 9:54 PM
NimWing Yuan
NimWing Yuan - avatar
+ 16
hmmm, ok I've read it, what next? 😃
2nd Jun 2017, 8:45 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 11
Yes, sssooo.... where's your question?
2nd Jun 2017, 7:52 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
i don't really think i understand your question but the backslash is used to escape the quotes, your string in python and most programming languages are written between those " " quotes so if i were to add an extra quote in my string like this --> "brians's Mother" i wouldn't get any error cause i have started with a double quote and i have a single quote in-between my string, the only time there is an issue is when i am using a double quote which i had used to start the string in-between my string like this "the "quotes" are issues" the interpreter thinks i am ending my string at that "the " and definitely throws an error
3rd Jun 2017, 6:16 AM
John Emma
John Emma - avatar
+ 1
You don't need to do \' instead when you use double quotes to enclose your message, if that's what you want to know. But you need to do \" if you need it.
2nd Jun 2017, 9:14 PM
Amaras A
Amaras A - avatar