wordlefish/step2.py

18 lines
273 B
Python

import pickle
rawdata = open("dataoutput", "rb")
data = pickle.load(rawdata)
buf = []
for i in data:
tot = 0
nums = 0
for j in data[i]:
tot += data[i][j]
nums += 1
buf.append([i, tot / nums])
buf.sort(key = lambda x: x[1])
print(buf[0])