with open(res_f_cut, 'w') as fw: s = ' '.join(['{} {}'.format(k, ','.join([str(i) for i in d[k][0:children_val_max]])) for k in d]) #fw.write(s)
文件指针
with open(res_f_cut, 'w') as fw: s = ' '.join(['{} {}'.format(k, ','.join([str(i) for i in d[k][0:children_val_max]])) for k in d]) #fw.write(s)
文件指针