摘要: queue模块 .time模块 collections模块 1.namedtuple: 生成可以使用名字来访问元素内容的tuple 2.deque: 双端队列,可以快速的从另外一侧追加和推出对象 3.Counter: 计数器,主要用来计数 4.OrderedDict: 有序字典 5.defaultd 阅读全文
posted @ 2019-05-09 20:37 jiuchen 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1,打印phpinfo()查看php版本,非线性安全,php内核是(x86,x64) 2,访问下面地址查找相应的模块, https://pecl.php.net/package-search.php 3,复制压缩包中的*.dll和*.pdb到php环境的ext中 并在对应的php.ini中增加 extension=*.dll 重启php环境即生效 阅读全文
posted @ 2019-05-09 16:26 jiuchen 阅读(350) 评论(0) 推荐(0) 编辑
摘要: ''' 1、对每个数进行平方, 2、求和 ''' print(sum(x ** 2 for x in range(4))) 阅读全文
posted @ 2019-05-09 14:03 jiuchen 阅读(116) 评论(0) 推荐(0) 编辑
摘要: python 文件读写 文件操作模式 r,只读模式(默认)。 w,只写模式。【不可读;不存在则创建;存在则删除内容;】 a,追加模式。【可读; 不存在则创建;存在则只追加内容;】 "+" 表示可以同时读写某个文件 r+,可读写文件。【可读;可写;可追加】 w+,先写再读。【这个方法打开文件会清空原本 阅读全文
posted @ 2019-05-09 12:09 jiuchen 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 优点:不会一下子在内存中生成太多数据 阅读全文
posted @ 2019-05-09 12:05 jiuchen 阅读(176) 评论(0) 推荐(0) 编辑
摘要: ''' 判断是否可迭代 字符串、列表、元组、字典、集合都可以被for循环,说明他们都是可迭代的 ''' from collections.abc import Iterable l = [1, 2, 3, 4] t = (1, 2, 3, 4) d = {1: 2, 3: 4} s = {1, 2, 3, 4} print(isinstance(l, Iterable)) print(isin... 阅读全文
posted @ 2019-05-09 11:53 jiuchen 阅读(219) 评论(0) 推荐(0) 编辑