努力解决Python日期时间问题

忍受我,因为我还是个新手。我只是想减去2个日期以获取之间的天数,并且工作得不太正确。这是我的代码的一部分,给我带来了问题,如您所见,我添加了额外的行只是为了帮助我确保一切顺利。

days = date2 - date1
        print(type(days))  # // for debugging
        print(days)  # // for debugging
        list3.append(days)
        print(type(list3))  # // for debugging
        print(list3)  # // for debugging
        print('The number of days between the two dates is', days)

这就是结果。

<class 'datetime.date'>
<class 'datetime.timedelta'>  ***<--needs to be string i think***
365 days, 0:00:00             ***<-- want just to print 365***
<class 'list'>
[datetime.timedelta(days=365)]   ***<-- needs to be a normal list format i think [365, 133] etc..*** 
The number of days between the two dates is 365 days, 0:00:00  ***<-- don't need time formatting***

我希望这不会让您感到困惑,并且足够的信息。我敢肯定这很简单,但是我已经用尽了Google,是时候问了。谢谢!!!