0

code to create string contain two quotes

6th Oct 2016, 7:35 PM
Abhishek Singh
Abhishek Singh - avatar
4 Respuestas
+ 3
thanks i found the ans. and ans is. \"
6th Oct 2016, 7:45 PM
Abhishek Singh
Abhishek Singh - avatar
+ 2
two ways to do it... you can escape the quotes print("My Quote: \"Inspiration comes from within \"") or the simpler way, use different quotation marks around the string: print('My Quote: "Inspiration comes from within" ')
6th Oct 2016, 8:03 PM
Luke Armstrong
+ 1
simply use triple quotes to start end end the string inside you can use any number of quotes for example print (''' 'he quote this' 'beautiful better than ugly' ''')
7th Oct 2016, 7:37 PM
Waseem
Waseem - avatar
- 1
yes i understand your answer...your answer perfect...thanks
6th Oct 2016, 8:07 PM
Abhishek Singh
Abhishek Singh - avatar