Python
Python:yield关键字
yield是python里的生成器,有效利用yield可以有效地节约程序占用的系统资源。 比如这里: # parse the message with regex def parse_one_page 阅读更多…
yield是python里的生成器,有效利用yield可以有效地节约程序占用的系统资源。 比如这里: # parse the message with regex def parse_one_page 阅读更多…
# -*- coding: utf-8 -*- # beautifulsoup from bs4 import BeautifulSoup import html import time import 阅读更多…
# -*- coding: utf-8 -*- # 正则表达式02 import re m = re.findall(“.”, “aa\nbbcc”) # . 是除了换行符之外所有的字符 # prin 阅读更多…
# -*- coding:utf-8 -*- # 正则表达式01 import re # 正则表达式包 m = re.findall(“abc”, “aaaaabcccabcc”) print(m) 阅读更多…