我想知道如何将列表中的每个元素转换为sha256并获取另一个列表中的值。', 'water.xlsx', 'sun.xlsx'] 我正在尝试使用列表压缩: lst1=[hashlib.sha256(b"i").hexdigest().upper() for i in lst] 但我只是重复了第一个元素</
我使用这里的答案将我的csv转换为python中的json。 How to convert CSV file to multiline JSON? 尽管每个json字段都是唯一的。我不确定如何确保每个子json字段都有一个唯一的元素列表。fieldnames) json.dump(row, jsonfile)
jsonfile.write(