上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 367 下一页
摘要: 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) 编辑
摘要: 001、 来源: https://zhuanlan.zhihu.com/p/491676471 阅读全文
posted @ 2023-08-27 23:37 小鲨鱼2018 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 001、 阅读全文
posted @ 2023-08-27 21:51 小鲨鱼2018 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 001、 利用循环结构实现 [root@PC1 test01]# ls a.fa test.py [root@PC1 test01]# cat a.fa ## 测试DNA序列 AAAACCCGGT [root@PC1 test01]# cat test.py ## 程序 #!/usr/bin/env 阅读全文
posted @ 2023-08-27 21:30 小鲨鱼2018 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 001、利用切片实现 >>> str1 = "abcdef" ## 测试字符串 >>> str1[::-1] 'fedcba' 002、利用for 循环实现 >>> str1 = "abcdef" ## 测试字符串 >>> rev = "" >>> for i in str1: ## 循环结构实现反 阅读全文
posted @ 2023-08-27 21:14 小鲨鱼2018 阅读(756) 评论(0) 推荐(0) 编辑
摘要: 001、 利用循环结构实现 [root@PC1 test01]# ls a.fa test.py [root@PC1 test01]# cat a.fa ## 测试RNA序列 AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA [root@PC1 阅读全文
posted @ 2023-08-27 20:10 小鲨鱼2018 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 001、利用循环结构 [root@PC1 test01]# ls a.fa test.py [root@PC1 test01]# cat a.fa ## 测试DNA序列 GATGGAACTTGACTACGTAAATT [root@PC1 test01]# cat test.py ## 转换程序 #! 阅读全文
posted @ 2023-08-26 19:54 小鲨鱼2018 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 367 下一页