摘要:
1.time模块 时间戳:1970年,1月1日开始时间元祖:包含日期,时间,保存日期结构的元祖对象格式化时间日期:按照指定的标记进行格式化处理 时间戳 import time time_num = time.time() # 获取时间戳 time_tuple = time.localtime(tim 阅读全文
posted @ 2021-08-21 17:52
zwx901323
阅读(47)
评论(0)
推荐(0)
摘要:
deque双端队列 #双端队列,就是生产消费者模式,依赖collections模块 from collections import deque def main(): info = deque(("hello", "word")) # 内部是序列 info.append(("百度一下")) # 右边 阅读全文
posted @ 2021-08-21 17:40
zwx901323
阅读(49)
评论(0)
推荐(0)
摘要:
迭代演示 # 传统数据生成缺陷演示,编号操作未全部使用,会占用内存 #合适的做法,是需要的时候再生产,而不是全部生成好了再用 def generator(maxnum): print("【代码执行前】") num = ("数据-{num}".format(num = i) for i in rang 阅读全文
posted @ 2021-08-21 17:05
zwx901323
阅读(63)
评论(0)
推荐(0)

浙公网安备 33010602011771号