摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: Input: "25525511135" Output: ["255 阅读全文
posted @ 2019-01-10 22:49 乐乐章 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 和 threading 的比较 多进程 Multiprocessing 和多线程 threading 类似, 他们都是在 python 中用来并行运算的. 不过既然有了 threading, 为什么 Python 还要出一个 multiprocessing 呢? 原因很简单, 就是用来弥补 thre 阅读全文
posted @ 2019-01-10 22:25 乐乐章 阅读(394) 评论(0) 推荐(0) 编辑
摘要: thread 在数据预处理的时候用处不大,因为有GIL 锁 查看thread信息 定义thread job并开启 join()的功能 先运行join的功能,然后再运行join 下面的。 注释掉 19、20 你也可以添加thread_2.join()进行尝试,但为了规避不必要的麻烦,推荐如下这种122 阅读全文
posted @ 2019-01-10 19:00 乐乐章 阅读(422) 评论(0) 推荐(0) 编辑