摘要: 001、 root@PC1:/home/test# ls a.fasta target.txt test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") targ 阅读全文
posted @ 2022-08-15 18:32 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 001、 方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = dic 阅读全文
posted @ 2022-08-15 18:17 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = dict() 阅读全文
posted @ 2022-08-15 18:04 小鲨鱼2018 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = {} for 阅读全文
posted @ 2022-08-15 17:58 小鲨鱼2018 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #1/usr/bin/python in_file = open("a.fasta", "r") dict1 = dict() 阅读全文
posted @ 2022-08-15 17:46 小鲨鱼2018 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = {} for i in in_file: i = i.strip() if i.startsw 阅读全文
posted @ 2022-08-15 17:27 小鲨鱼2018 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:51 小鲨鱼2018 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 001、 split + join实现 >>> str1 = 'abcdedfg' >>> str1 'abcdedfg' >>> str1.split('d') ## 拆分为列表 ['abc', 'e', 'fg'] >>> "".join(str1.split('d')) ## 组合成字符串 ' 阅读全文
posted @ 2022-08-15 16:44 小鲨鱼2018 阅读(699) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:28 小鲨鱼2018 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:03 小鲨鱼2018 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fastq", "r") out_file = open 阅读全文
posted @ 2022-08-15 15:53 小鲨鱼2018 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> set1 = {"a", "b", "c", "d"} ## 测试集合 >>> set1 {'c', 'a', 'd', 'b'} >>> set1.remove("d") ## 删除集合中的元素 >>> set1 {'c', 'a', 'b'} >>> set1.add(&qu 阅读全文
posted @ 2022-08-15 14:49 小鲨鱼2018 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> dict1 = {"a":100, "b":200, "c":300, "d":400, "e":500} ## 测试字典 >>> dict1 {'a': 100, 'b': 200, 'c': 300, 'd': 400, 'e': 500} >>> dict1.get("b") 阅读全文
posted @ 2022-08-15 14:37 小鲨鱼2018 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 001、利用内置函数update实现 >>> dict1 = {"a":100, "b":200} ## 测试字典1 >>> dict1 {'a': 100, 'b': 200} >>> dict2 = {"c":300, "d":400} ## 测试字典2 >>> dict2 {'c': 300, 阅读全文
posted @ 2022-08-15 14:26 小鲨鱼2018 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 001、 直接利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["b"] = 8888 ## 更新字 阅读全文
posted @ 2022-08-15 14:15 小鲨鱼2018 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 001、利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["e"] = 500 ## 直接利用索引实 阅读全文
posted @ 2022-08-15 14:10 小鲨鱼2018 阅读(1306) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> test1 = ["a", "b", "c", "d", "e", "f", "g"] ## 测试列表 >>> test1 ['a', 'b', 'c', 'd', 'e', 'f', 'g'] >>> test1[2:-2] ## 同时删除首尾的两个字符 ['c&# 阅读全文
posted @ 2022-08-15 13:44 小鲨鱼2018 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 001、 #include <stdio.h> #include <limits.h> int main(void) { printf("CHAR_BIT: %d\n", CHAR_BIT); return 0; } 阅读全文
posted @ 2022-08-15 02:21 小鲨鱼2018 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 001、 c语言中将表示字符的char型的长度定义为1. #include <stdio.h> #include <limits.h> int main(void) { printf("sizeof(char) = %u\n", (unsigned)sizeof(char)); printf("si 阅读全文
posted @ 2022-08-15 02:14 小鲨鱼2018 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 001、字符型和整型可以归纳为四大类。 char、 short int、 int、 long int。 char可以归为3类: char、signed char、unsigned char; short int可以归为两类: signed short int、 unsigned short int; 阅读全文
posted @ 2022-08-15 01:31 小鲨鱼2018 阅读(444) 评论(0) 推荐(0) 编辑