题解 | #计算日期到天数转换#
计算日期到天数转换
https://www.nowcoder.com/practice/769d45d455fe40b385ba32f97e7bcded
from datetime import date str = input().strip().split() targetdate = date(int(str[0]), int(str[1]), int(str[2])) getdate = date(int(str[0]),1,1) num = targetdate-getdate num1=num.days+1 print(num1)