lmgsanm

每天学习一点,每天进步一点点…… Tomorrow is another beatifull day

导航

2018年1月22日

str.index()与str.find()比较

摘要: 1 def extract_from_tag(tag,line): 2 opener = "<" + tag + ">" 3 closer = "</" + tag + ">" 4 try: 5 i = line.index(opener)# i = 7 6 start = i + len(open 阅读全文

posted @ 2018-01-22 21:09 lmgsanm 阅读(991) 评论(0) 推荐(0) 编辑