str = [result, predict, data_test]
for i in str
f.write()

これで動くっけ?