with open('表示.txt','a',encoding='utf-8') as f:
with open('a-0.txt','r',encoding='utf-8')as f0:
a=eval(f0.read())
out={}
for keys in a.keys():
s = 0.0
for word in a[keys].keys():
try:
k,f=search(word)
except KeyError:continue
for kk in k:
s+=kk*a[keys][word]
try:
s =s.tolist()
except:continue
print(type(s))
print(str(out))
f.write(str(s))