📜  python 写换行符 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:42.239000             🧑  作者: Mango

代码示例1
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)