python读取txt文件
import oskeys_file = 'keys_file.txt'with open(keys_file, 'r', encoding='utf-8') as rfile: keys = rfile.readlines() for item in keys: d = dict(eval(item)) if str_key != '': if d['key'] == str_key: .
原创
2022-05-13 14:13:28 ·
146 阅读 ·
0 评论