How to write new line in Python

We can use the new line character "\n" in Python scripts.

Let's see one example print.

>>> print ("line1\nline2")

The same method can also be used on writing data to files.

That's all…

Leave a Reply

Your email address will not be published. Required fields are marked *