Answers for "break line in code python"

0

python write line break

new_line = "This new line will be added.n"

with open("sample.txt", "a") as a_file:
  a_file.write("n")
  a_file.write(new_line)
Posted by: Guest on August-19-2020
0

break line in string python

myString = '1X2X3X'
print (myString.replace ('X', 'Xn'))
Posted by: Guest on December-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language