def strcount(a):
b={}
c=len(a)
i=0
while i<c:
if a[i] in b:
b[a[i]]+=1
else:
b[a[i]]=1
i+=1
for item in b.items():
print(item)
if __name__ == '__main__':
ss_1 = 'aggcacggaaaaacgggaataacggaggaggacttggcacggcattacacggaggacgaggtaaaggaggcttgtctacggccggaagtgaagggggatatgaccgcttgg'
freq = strcount(ss_1)
print(freq)
https://blog.csdn.net/fu_jian_ping/article/details/88907572?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase ps:
|