bug_x

导航

 

2018年10月24日

摘要: 1\协程 def get_title(i): print(threading.current_thread().name) # 打印出当前线程名称 gevent.joinall([gevent.spawn(get_title, i) for i in range(10)]) def get_titl 阅读全文
posted @ 2018-10-24 23:52 bug_x 阅读(176) 评论(0) 推荐(0) 编辑
 
摘要: eg: Error self._target(*self._args, **self._kwargs) TypeError: get_zonghe_answers() takes 1 positional argument but 36 were given Instead, you should 阅读全文
posted @ 2018-10-24 21:33 bug_x 阅读(380) 评论(0) 推荐(0) 编辑
 
摘要: http://wuduozhi.me/2018/06/21/python-Multiprocessing%E5%A4%9A%E8%BF%9B%E7%A8%8B/ https://blog.csdn.net/Winterto1990/article/details/48102005 阅读全文
posted @ 2018-10-24 18:53 bug_x 阅读(122) 评论(0) 推荐(0) 编辑
 
摘要: l = [1,2,3,4] b = [4,5,6] l.remove(1) #val del l[0] #key new_list = l.extend(b) #[1,2,3,4,4,5,6] new_list = l.append('a') #[1,2,3,4,'a'] 阅读全文
posted @ 2018-10-24 12:14 bug_x 阅读(104) 评论(0) 推荐(0) 编辑
 
摘要: eg1: 阅读全文
posted @ 2018-10-24 12:12 bug_x 阅读(528) 评论(0) 推荐(0) 编辑
 
摘要: resp = requests.get(url) resp.encoding = 'utf-8' answer_list = [] if resp: bs_data = BeautifulSoup(resp.text, 'lxml') 阅读全文
posted @ 2018-10-24 10:10 bug_x 阅读(140) 评论(0) 推荐(0) 编辑