摘要: dic = dict() def add_two_dimensional_dictionary(old_dict,key_a,key_b,value): if key_a in old_dict: old_dict[key_a].update({key_b:value}) else: old_dic 阅读全文
posted @ 2022-06-22 23:19 xuecl 阅读(41) 评论(0) 推荐(0) 编辑
摘要: def get_last_line(file_name): offset = -10 with open(file_name, 'rb') as f: # 读取方式要以字节读取 while 1: """ f.seek(off, whence=0):从文件中移动off个操作标记(文件指针),正往结束方 阅读全文
posted @ 2022-06-22 23:03 xuecl 阅读(102) 评论(0) 推荐(0) 编辑