赞
踩
from datetime import *
s=date(2022,1,1)
e=date(2022,12,31)
day=timedelta(days=1)
def shun(s):
if '012' in s or '123'in s or '234'in s or '345'in s or '456'in s or '567'in s or '678'in s or '789'in s:
return 1
ans=0
while s<=e:
s1=str(s).replace('-','')
if shun(s1):
print(s1)
ans+=1
s+=day
print(ans)
14个
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。