摘要:
jieba分词: import jieba with open("C:\\Users\\86133\\Desktop\\liaozhai.txt", "r", encoding='utf_8') as f: words = jieba.lcut(f.read()) counts = {} for w 阅读全文
posted @ 2023-12-28 21:11
LXxx007
阅读(17)
评论(0)
推荐(0)
02新建一个文件,并保存一段话2.6.2python代码: # 打开文件并获取文件对象 file = open("test.txt", "w",encoding="utf8") # 写入单行文本 file.write("2.6.2\n") # 写入多行文本 lines = ["3147"] file 阅读全文