摘要: collections模块 1.namedtuple(具名元组) 生成可以使用名字来访问的元素的tuple 例如表示坐标x为1 y为2的坐标 使用from collections import namedtuple来到导入模块 2.queue队列 队列:先进先出 (FIFO first in fir 阅读全文
posted @ 2019-07-18 20:56 LD_Dragon 阅读(142) 评论(0) 推荐(0) 编辑
摘要: # 面试题## 自动发布功能测试```python'''面试题: 请写出一下代码的执行结果并解释。'''def multipliers(): return [lambda x, i=i: i*x for i in range(4)] # 0, 1, 2, 3 # [func(x): return 0*x, func(x): return 1*x, # func(x):... 阅读全文
posted @ 2019-07-18 16:15 LD_Dragon 阅读(123) 评论(0) 推荐(0) 编辑