![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
s亮
这个作者很懒,什么都没留下…
展开
-
某一IT公司要求的python面试题
使用python编写一个网站爬虫程序,支持参数如下: spider.py -u url -d deep -f logfile -l loglevel(1-5) --testself -thread number --dbfile filepath --key=”HTML5” 参数说明: -u 指定爬虫开始地址 -d 指定爬虫深度 --thread 指定转载 2014-10-21 21:53:44 · 566 阅读 · 0 评论 -
python的re
工作中经常要和字符串打交道。匹配搜索自然少不了,这是正则表达式的强项。 直接上代码练习。这里讲的比较详细,可以参考。 正则表达式两种等价用法,如果在一个程序中经常用到pattern,那么推荐使用方法1。 方法1:prog = re.compile(pattern) result = prog.match(string) 方法2:result = re.match(patte原创 2014-11-29 16:00:24 · 499 阅读 · 0 评论 -
collections之defaultdict
python字典dict,在使用过程中,插入元素或者更新原创 2014-10-10 23:19:42 · 688 阅读 · 0 评论