摘要: collections模块 复杂的数据类型 有名元祖 1 2 默认字典 1 nan 双端队列 deque([1, 2, 3, 4]) deque([0, 1, 2, 3, 4]) deque([2, 3, 4]) 计数器 Counter({'r': 2, 'g': 2, 'm': 2, 'p': 1 阅读全文
posted @ 2019-08-20 17:29 黑糖A 阅读(90) 评论(0) 推荐(0) 编辑
摘要: re模块 从字符串里找到特定的字符 re的基本语法(匹配规则) ['王大炮'] ['死了'] ['a', 'c', 'e', 'f', 'a', 'c', 'e', 'f', 'f', 'f'] ['g', 'h', 'j', 'k', 's', 'd', 's', 'd'] ['aba', 'ad 阅读全文
posted @ 2019-08-20 17:19 黑糖A 阅读(109) 评论(0) 推荐(0) 编辑
摘要: typing模块 提供了Generator,Iterable,Iterator三种数据类型,限制函数 typing常用类型 int、long、float: 整型、长整形、浮点型 bool、str: 布尔型、字符串类型 List、 Tuple、 Dict、 Set:列表、元组、字典、集合 Iterab 阅读全文
posted @ 2019-08-20 14:53 黑糖A 阅读(292) 评论(0) 推荐(0) 编辑