擅长:python、mysql、java
<p>由于<code>diffrence</code>是<a href="https://docs.python.org/3/library/datetime.html#available-types" rel="nofollow noreferrer">^{<cd2>}</a>类型,您应该将<a href="https://docs.python.org/3/library/datetime.html#datetime.timedelta.total_seconds" rel="nofollow noreferrer">^{<cd3>}</a>方法用作:</p>
<pre><code> print(diffrence.total_seconds())
</code></pre>