print(result) with open("Result\Summary\GA" + name + "_" + str(k) + "binsize_" + str(t) + "iterate_" + str(percent) + "keepgene.csv", "w", newline='') as f: writer = csv.writer(f) writer.writerows(result) with open("Result\Summary\Time\GATime" + name + "_" + str(k) + "binsize_" + str(t) + "iterate_" + str(percent) + "keepgene.csv", "w", newline='') as f: writer = csv.writer(f) writer.writerow(time) tools = Tool(data) nameGraph = "Result\Summary\Graph\GA" + name tools.Draw_Graph(bestR, dict, nameGraph, 'bo-', 'GA' + name) # tools = Tool(data) # time = [] # for i in range(10): # start = datetime.datetime.now().timestamp() # a, b, c = tools.Generic_Algorithm(k,t,b) # end = datetime.datetime.now().timestamp() # time.append(end - start) # # with open("Result\Time\outGA" + name, "w", newline='') as f: # writer = csv.writer(f) # writer.writerows([time]) # print(time) # tools.Draw_Graph(a, c, name, 'ro-')