Search code snippets, questions, articles...

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)

Search Index Data (The code snippet can also be found with below search text)

multi line string python
Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet