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."""
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place.

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

multi line string python
Was this helpful?