擅长:python、mysql、java
<p>你看错了文件。<code>time</code>模块<a href="http://docs.python.org/2/library/time.html#time.strftime" rel="noreferrer">has different documentation</a>。</p>
<p>您可以像这样使用<code>datetime</code>模块<a href="http://docs.python.org/2/library/datetime.html#strftime-strptime-behavior" rel="noreferrer">^{<cd3>}</a>:</p>
<pre><code>>>> from datetime import datetime
>>>
>>> now = datetime.now()
>>> now.strftime("%H:%M:%S.%f")
'12:19:40.948000'
</code></pre>