+ 1

How to create a string containing double quote?

string

1st Mar 2019, 1:34 PM
Rimsha Khan
Rimsha Khan - avatar
3 odpowiedzi
+ 4
alternatively my favourite way: print("""This"string"has"double"quotes'and' single'ones""")
1st Mar 2019, 1:52 PM
Hubert Dudek
Hubert Dudek - avatar
+ 2
Although above answers are enought but just to know, alternatively, you can also use escape sequence. print("\"Hello\" world") >>>"Hello" world
1st Mar 2019, 2:54 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 1
Use single quotes at each end of the string. print(‘This”string”has”double”quotes’)
1st Mar 2019, 1:43 PM
Russ
Russ - avatar