Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 230 Bytes

python.md

File metadata and controls

20 lines (15 loc) · 230 Bytes

读文件

file = open(fn, 'r')
content = file.read()

常用字符串操作

line.strip()
str.find('find me') == -1
str[lo, hi] // hi is exclusive

读取终端输入

for line in sys.stdin