Create a code using string containg doubble quote | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Create a code using string containg doubble quote

it is something like that and I can't find the answer >>>(" ") please help me to solve this problem😊😢

24th Sep 2018, 2:25 PM
Rugved Patil
Rugved Patil - avatar
3 Answers
+ 2
Hello, What you're trying to do is put special characters in a string. You just need to "escape" the special characters of the string, and this is done with a backslash in python (and most languages) e.g. : print("just use backslash to escape the quotes \"\" ") You can find many more examples of escaping characters if you look a bit around Internet. Does this answer your question ?
24th Sep 2018, 3:02 PM
+ 1
>>> print(" \"\" ")
25th Sep 2018, 10:24 AM
jitendra kumar
jitendra kumar - avatar
you can also use single quotes instead like this- 'i can ”help you" bro' or by using triple quotes '''i can "help you" bro'''.
5th Oct 2018, 6:05 PM
abhilash chevella
abhilash chevella - avatar