+ 1
Inserting quotes.
please provide me the clear concept regarding inserting the quotes in puthon. I will be thankful.
2 Answers
+ 4
\' and \" are characters that can be used inside ' ' and " ". Otherwuse, just insert ' in " " and " in ' '
+ 3
s1 = 'Insert double "quotes" when the outer qoutes are single'
s2 = "Insert single 'quotes' when the outer qoutes are double"
s3 = "Insert double \"quotes\" when the outer qoutes are double by escaping the charaters with a backslash"
s4 = 'Insert single \'quotes\' when the outer qoutes are single by escaping the charaters with a backslash'
s5 = '''Create a literal string and use either "double" or 'single' quotes inside using 3 single outer quotes'''
s6 = """Create a literal string and use either "double" or 'single' quotes inside using 3 double outer quotes"""