Eno 12345 Eno 12345 - 5 months ago 27
Python Question

How to print multiple lines of text with python

If I wanted to print multiple lines of text in python without typing print('') for every line, is there a way to do that?

(python 3.5.1)
Thank you.

Answer

You can use Triple quotes (single ' or double "):

a = """
text
text
text
"""

print(a)