Using Triple Quotes for Strings in Python


Triple quotes can be used for multi-line strings or strings containing quotes.

Source Code

multi_line_string = """This is a string that spans
multiple lines."""
print(multi_line_string)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments