摘要: 001、对G、C计数进行统计 [root@pc1 test01]# ls a.fa test.py [root@pc1 test01]# cat a.fa ## 测试DNA序列 >Rosalind_6404 CCTGCGGAAGATCGGCACTAGAATAGCCAGAACCGTTTCTCTGAGG 阅读全文
posted @ 2023-08-28 21:43 小鲨鱼2018 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 001、依据字典的值对字典进行排序 a、正向排序 >>> dict1 = {"c":30, "a":40, "b":80, "d":20, "e":60} ## 测试字典 >>> dict1 {'c': 30, 'a': 40, 'b': 80, 'd': 20, 'e': 60} >>> sort 阅读全文
posted @ 2023-08-28 21:06 小鲨鱼2018 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 001、依据字典的键进行排序 a、正向排序 >>> dict1 = {"c":30, "a":40, "b":80, "d":20, "e":60} >>> dict1 {'c': 30, 'a': 40, 'b': 80, 'd': 20, 'e': 60} >>> for i in sorted 阅读全文
posted @ 2023-08-28 21:05 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 001、 输出键最大的项 a、 >>> dict1 = {"c":30, "a":40, "b":80, "d":20, "e":60} >>> dict1 {'c': 30, 'a': 40, 'b': 80, 'd': 20, 'e': 60} >>> max_key = max(dict1.k 阅读全文
posted @ 2023-08-28 20:57 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 001、输出值最大的项 a、 >>> dict1 = {"c":30, "a":40, "b":80, "d":60} ## 测试字典 >>> dict1 {'c': 30, 'a': 40, 'b': 80, 'd': 60} >>> max_value = max(dict1.values()) 阅读全文
posted @ 2023-08-28 20:33 小鲨鱼2018 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 001、直接比较计算 [root@PC1 test01]# ls a.fa b.fa test.py [root@PC1 test01]# cat a.fa ## 测试dna序列 GAGCCTACTAACGGGAT [root@PC1 test01]# cat b.fa ## 测试dna序列 CAT 阅读全文
posted @ 2023-08-28 10:33 小鲨鱼2018 阅读(54) 评论(0) 推荐(0) 编辑