how to create multiline string in python code example
Example 1: python multiline string
'''This is a
multiline
string.'''
"""It can be used as a
multiline comment
too."""
Example 2: format multi line string python
line_str = "I'm learning Python.\nI refer to TechBeamers.com tutorials.\nIt is the most popular site for Python programmers."
print("Long string with newlines: \n" + line_str)
multiline_str = """I'm learning Python.
I refer to TechBeamers.com tutorials.
It is the most popular site for Python programmers."""
print("Multiline string: \n" + multiline_str)