帮我写一段Python程序爬取word文档中内容为“得分”后的3个字符

答: import re with open('word文档.txt', 'r') as f: content = f.read() m = re.search('得分(.{3})', content) if m: print(m.group(1))

猜你喜欢

转载自blog.csdn.net/weixin_35754962/article/details/129452078