今日学习总计

今日开始学习Python爬虫技术

import re
test_string = "我是一个中国人。在学习爬虫。爬虫非常有趣。"
regex = "爬虫"
p_string = test_string.split("。")
for line in p_string:
if re.search(regex,line) is not None:
print(line)

print(p_string)

posted @ 2021-03-22 16:28  禁小呆  阅读(24)  评论(0)    收藏  举报