# -*- coding: utf-8 -*- # ============================================================================= # Ctrl + 1: 注释/反注释 # # Ctrl + 4/5: 块注释/块反注释 # # Ctrl + L: 跳转到行号 # # Tab/Shift + Tab: 代码缩进/反缩进 # ============================================================================= for i in range(128): print(chr(i).__repr__(),end=" ") print(type('a')) print("I'm the bone of my sword. Steel is my body and ...") print("chrom start end strand name score") print("chr1 520000 530000 + gene1 0") print("\") chr_, start, end = "chr1", 1000, 2000 tmpl = "gene1 chromosome {} start {} end {}" # 这里定义了一个 模板,{} 占位处在 format 时会被替换 print(tmpl.format(chr_, start, end)) bs = b"this is a bytes" print(type(bs)) print(bs) #s = "hello world" #print(s) #s.encode('utf-8').decode('utf-16') #print(s) l1 = [1, "this is a str", 1.114, True] print(l1[1:3])
result: