08 2013 档案

摘要:利用python+selenium引擎渲染web,爬取含有javascript、css、ajax的网页 阅读全文
posted @ 2013-08-27 22:25 搞点儿算法 阅读(1369) 评论(0) 推荐(0)
摘要:闲话少叙,python中经常会对字典的索引进行搜索判断,如判断‘user’是否为{'user1':'New Student','user2':'Old student'}的索引,本文总结了5种方法进行索引的搜索,并比较了运行时间。五种方法有:① index in dict.keys()② dict.has_key(index)③ index in dict④ index in set(dict)⑤ index in set(dict.keys())先构建一个程序运行时间的函数,用于测试。from time import clock 阅读全文
posted @ 2013-08-26 18:11 搞点儿算法 阅读(3313) 评论(2) 推荐(0)