- 博客(1)
- 收藏
- 关注
原创 python面试整理
Python基础文件操作1.有一个jsonline格式的文件file.txt大小约为10Kdef get_lines(): with open('file.txt','rb') as f: return f.readlines()if __name__ == '__main__': for e in get_lines(): process(e) # 处理每一行数据 def get_lines(): with open('file.txt','rb') as f:
2020-09-23 15:06:55
4146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人