Python TypeError: an integer is required (got type tuple)
关注:256 答案:2 mip版
解决时间 2021-01-12 12:36
提问者青春统帅
2021-01-12 08:08
目的 获取两个日期计算日期差
import time
import datetime
aaa = datetime.datetime(time.strptime(input("Which day is the first day you learning English? "), "%Y-%m-%d")[0:3])
bbb = datetime.datetime(time.strptime(input("Which day is the latest day you learning English? "), "%Y-%m-%d")[0:3])
days = (bbb - aaa).days
但是 一直报错
Which day is the first day you learning English? 2016-07-16
Traceback (most recent call last):
File "", line 1, in
aaa = datetime.datetime(time.strptime(input("Which day is the fi