上一页 1 ··· 146 147 148 149 150 151 152 153 154 ··· 367 下一页
摘要: c语言中 1u: 表示是unsigned 1; 其二进制表示形式是 0000 0000 0000 0001. (此处假定int型的长度为2字节,1个字节8位); x & 1u: &符号表示按位操作的逻辑与运算,即两者都为1时,结果才为1. if (x & 1u)实质上就是判断x用二进制表示时,末尾的 阅读全文
posted @ 2022-08-16 02:12 小鲨鱼2018 阅读(842) 评论(0) 推荐(0) 编辑
摘要: 对于整数内部的位,有4种逻辑运算。 a、逻辑与, &, 两者都为1时结果为1. b、逻辑或, |, 两者只要一个为1结果就为1. c、逻辑异或,^,有且只有一个为1结果才为1. d、反码, ~,如果是0,结果是1; 如果是1,结果为0. a & b; 对操作数的各二进制位进行逻辑运算。 5 & 4 阅读全文
posted @ 2022-08-16 01:02 小鲨鱼2018 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
上一页 1 ··· 146 147 148 149 150 151 152 153 154 ··· 367 下一页