0

How to create a string using a double quote

2nd Jan 2017, 6:32 AM
Reshma Raghu
Reshma Raghu - avatar
2 ответов
+ 2
How you would go about creating a string using a double quote (if you meant outputting the double quotes) would be as follows Ex) name = 'My name is "Bob"' Output: My name is "Bob" You would just create the string using single quotes and then continue to use the double quotes where ever you would like them. I hope this helps!
2nd Jan 2017, 6:47 AM
Mikayla
0
in addition to above: if you want to use double quotes when creating string, then you have to escape the double quotes inside it, like so: name = "My name is \"Bob\""
8th Jan 2017, 12:29 AM
Renata