break line in python string code example
Example 1: break line in string python
myString = '1X2X3X'
print (myString.replace ('X', 'X\n'))
Example 2: python carriage return
## In Python, you can put a carriage return into a string using '\r'.
## This is basically just a newline, and usually you would just use
## '\n'.