原始txt文件
程序实现后结果-将txt中元素提取并保存在csv中
程序实现
import csv
filename = "./test/test.txt"
Sum_log_file = "....for i in range(8)]
# 将txt中文件信息保存到Sum_log和DNA_log列表中
with open(filename, 'r') as f:
i = 1
for...sum_eva_index[4])) # GC
Sum_no = Sum_no + 1
# print(sum_evaindex[0]) # [45.0, 27.0, 45.0]
# 遍历个体信息,并将其保存到...0.0, 5.0]
Sum_log_file_header = ["No", "Continuity", "Hairpin", "H-measure", "Similarity", "GC"]
# 将数据写入...csv日志文件中
with open(Sum_log_file, "w", newline='') as f:
writer = csv.writer(f)
writer.writerow