python

Assign multi-line string to a variable in python

To use multi-line string in python you can use three quotes when making the string.

a = """Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua."""
print(a)
Was this helpful?