[Type A] Python Revision Tour-1 – Chapter 1

|
Table of Contents

7. How are string literals represented and implemented in Python?

String literals in Python can be represented using single, double, or triple quotes. For example:

s1 = 'single quoted string'
s2 = "double quoted string"
s3 = '''triple quoted string'''

Triple quotes are used for multiline strings.

"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *