擅长:python、mysql、java
<p>使用<code>datetime</code>模块。在</p>
<p><strong>例如:</strong></p>
<pre><code>import datetime
t = "10:34:45"
t = datetime.datetime.strptime(t, "%H:%M:%S")
print( (t + datetime.timedelta(seconds=1)).strftime("%H:%M:%S") )
</code></pre>
<p><strong>输出:</strong></p>
^{pr2}$