摘要: 内置模块之 itertools count函数 import itertools # 创建一个无限的迭代器, 起始值为0, 步长为1 count_iter = itertools.count(start=0, step=1) for n in count_iter: if n > 10: break 阅读全文
posted @ 2020-09-05 14:06 三叶草body 阅读(153) 评论(0) 推荐(0)
摘要: # -*- coding:utf-8 -*- ############################# # pip install pycryptodome ############################# import base64 from Crypto import Random 阅读全文
posted @ 2020-09-05 13:56 三叶草body 阅读(835) 评论(0) 推荐(0)
摘要: python 实现年龄计算 方法一: import datetime month_days = { 1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31 } def is_leap_ 阅读全文
posted @ 2020-09-05 13:45 三叶草body 阅读(5679) 评论(0) 推荐(0)