python学习(1)txt文件读写

经常使用的python读写模式 读取txt文件 读取txt文件(文件存在) def read_txt(self, path): """读取txt文本""" with open(path, 'r') as f: r = f.readlines() print('输出readlines结果', r) 运行结果为:pyth
相关文章
相关标签/搜索