随笔分类 -  python拾遗

python使用过程中的碎碎念
python中的Collections模块之Counter
摘要:虽然工作中常用Python,但都是些基本操作,对于这种高阶的工具包,一直是只知道有那么个东西,没调用过,每次都是自己造轮子。 人生苦短, 我用Python,为毛还重复造轮子,装什么C呢。 看下collections的init __all__ = ['deque', 'defaultdict', 'n 阅读全文

posted @ 2021-12-04 21:43 超级大懒虫vip 阅读(357) 评论(0) 推荐(0)

pyhton 信号量Semaphore和BoundedSemaphore
摘要:Semaphore和BoundedSemaphore两个,用起来好像没啥区别 都是定义信号量 sem=threading.BoundedSemaphore(5) sem=threading.Semaphore(5) sem.acquire() #一系列操作 sem.release() 不过Bound 阅读全文

posted @ 2020-04-11 09:56 超级大懒虫vip 阅读(1384) 评论(0) 推荐(0)

记python 链式比较的坑
摘要:python,多个表达式判断 阅读全文

posted @ 2020-03-09 22:00 超级大懒虫vip 阅读(645) 评论(0) 推荐(0)

导航