正则表达式自用模板,还未优化

import re

html_str = """


"""

ret = re.findall(r"(.*?)", html_str)
print(ret)
print(len(ret))


for i in ret:
    if ret.index(i) % 7 == 0:
        print("\n")
    print("文章名:" + "《" + i[1] + "》" + "    " + "文章链接:https://www.jianshu.com/p/" + i[0])


你可能感兴趣的:(正则表达式自用模板,还未优化)