how to break a python string to the next line code example Example: break line in string python myString = '1X2X3X' print (myString.replace ('X', 'X\n'))