计算DNA核苷酸A、C、G、T出现次数计算DNA核苷酸A、C、G、T出现次数
with open("rosalind_dna.txt") as f: fragment_of_dna = f.read() fragment_of_dna.rsplit()
print(fragment_of_dna.count("A"), fragment_of_dna.count("C"), fragment_of_dna.count("G"), fragment_of_dna.count("T"))
计算DNA核苷酸A、C、G、T出现次数计算DNA核苷酸A、C、G、T出现次数
with open("rosalind_dna.txt") as f: fragment_of_dna = f.read() fragment_of_dna.rsplit()
print(fragment_of_dna.count("A"), fragment_of_dna.count("C"), fragment_of_dna.count("G"), fragment_of_dna.count("T"))