为什么不能在打开的文件上调用read()两次?
read()
f = f.open()# get the yearmatch = re.search(r'Popularity in (\d+)', f.read())if match: print match.group(1)# get all the namesmatches = re.findall(r'<td>(\d+)</td><td>(\w+)</td><td>(\w+)</td>', f.read())if matches: # matches is always None
read()
暮色呼如
元芳怎么了
相关分类