Код для задания 1
name = input()#Bacillus subtilis, Peptoclostridium acidaminophilum,Ureaplasma parvum pseudo = input() dict_C = {} with open(name + ".txt", mode="r") as file: lines = file.readlines() for j in range(len(lines)): if lines[j][0] == ">" : if pseudo == "yes" and lines[j].find("pseudo=true") != -1 or pseudo == "no" and lines[j].find("pseudo=true") == -1: codon = lines[j+1][0:3] if codon in dict_C: dict_C[codon] += 1 else: dict_C[codon] = 1 for key in dict_C.keys(): print(key, dict_C[key], sep="\t")