标签:切分 div col with open with open pre 指定 line
读取文件内容:
# 读取文件内容并按换行符切分 lines = open("data/voc01.txt", encoding="utf-8").read().split("\n")
写入文件:
# 追加写入到指定文件 str = "abcd" with open(‘E:/test/test_en.txt‘, mode=‘a+‘, encoding="utf-8") as w: w.write(str + "\n")
标签:切分 div col with open with open pre 指定 line
原文地址:https://www.cnblogs.com/jumpkin1122/p/11516956.html