import time def inpu(): the_year = int(input('输入年份(年份需大于等于1970小于等于2038):')) if len(str(the_year)) == 4 and 1970 <= the_year <= 2038: the_mon = int(input('输入月份:'))
python中利用Time模块判断输入年月日为该年第几天
最新推荐文章于 2023-10-12 16:43:19 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
import time def inpu(): the_year = int(input('输入年份(年份需大于等于1970小于等于2038):')) if len(str(the_year)) == 4 and 1970 <= the_year <= 2038: the_mon = int(input('输入月份:'))