0

How to create a string ?

Complete the code to create a string containing a double quote.

27th Oct 2018, 3:04 PM
Ishan Das
Ishan Das - avatar
3 Answers
0
d="\"" s = d+'text'+d print (s)
27th Oct 2018, 3:09 PM
АлДĐșŃĐ°ĐœĐŽŃ€
0
str = "\"text\"" Here \ is the escape character - it wont print and it helps to avoid problems when inserting quotes inside the string
27th Oct 2018, 4:20 PM
Seniru
Seniru - avatar
0
In Python there's a more readable way. The different sets of quotes are exchangeable. So when you need ', you write print("abc'def") and when you need ", you write print('abc"def')
27th Oct 2018, 5:59 PM
HonFu
HonFu - avatar