TECHIES WORLD

For Techs.... Techniques.... Technologies....

CpanelLinuxPython

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")
line1
line2

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

That's all…

Leave a Reply