我有下面的代码,我得到的输出如下:-在2017-06-22和2017-06-27之间有5天,0:00:00天,但我只想:-在2017-06-之间有5天- 22和2017-06-27
下面是我的代码:-
from datetime import date
import random
earlier_date = date(2017, 6, random.randint(1, 25))
later_date = date(2017, 6, random.randint(earlier_date.day + 1, 28))
days_between= later_date- earlier_date
print("There are", days_between, "days between", earlier_date, "and", later_date)
慕妹3242003
摇曳的蔷薇
相关分类