+ 1

Inserting quotes.

please provide me the clear concept regarding inserting the quotes in puthon. I will be thankful.

3rd Sep 2017, 4:50 AM
poudel hardik
poudel hardik - avatar
2 Réponses
+ 4
\' and \" are characters that can be used inside ' ' and " ". Otherwuse, just insert ' in " " and " in ' '
3rd Sep 2017, 7:00 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 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"""
3rd Sep 2017, 5:20 AM
ChaoticDawg
ChaoticDawg - avatar