摘要: 1.字典的定义方式有以下: a=dict(one=1,two=2,three=3) b={'one':1,'two':2,'three':3} c=dict(zip(['one','two','three'],[1,2,3])) d=dict([('two',2),('one',1),('three 阅读全文
posted @ 2019-11-08 22:46 阿贝尔 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 线程(threading)运行在进程内部,可以访问进程中所有内容,multiprocessing 和 threading 的区别之一就是 threading 没有 terminate() 函数。很难终 止一个正在运行的线程,因为这可能会引起代码和时空连续性上的各种问题。要使用线程,程序中所用代码以及 阅读全文
posted @ 2019-11-08 20:38 阿贝尔 阅读(511) 评论(0) 推荐(0) 编辑