发布时间:2019-09-25 08:17:04编辑:auto阅读(4475)
import calendar import datetime def getNextMonday(): today = datetime.date.today() print today oneday = datetime.timedelta(days = 1) m1 = calendar.MONDAY while today.weekday() != m1: today += oneday nextMonday = today.strftime('%Y%m%d') return nextMonday print getNextMonday()
======================================================= 输出: 2017-11-28 20171204
上一篇: Python开根号
下一篇: python处理音频文件(mp3)
50376
49661
40273
37311
31719
28578
27513
22300
22288
20602
346°
946°
743°
702°
939°
824°
1432°
2697°
2439°
1881°