Friday, May 25, 2018

Why triple quotes (" " ") are used in Python

For multiline strings with line breaks, you can use triple quotes, either ''' or " " ":

c = """
This is a long string that
spans multiple lines
"""

No comments:

Post a Comment