擅长:python、mysql、java
<p>请参阅Python文档中的<a href="http://docs.python.org/library/stdtypes.html#file-objects" rel="noreferrer">File Objects</a>,特别是<a href="http://docs.python.org/library/stdtypes.html#file.tell" rel="noreferrer">tell</a>()。</p>
<p>示例:</p>
<pre><code>>>> f=open('test.txt','w')
>>> f.write(10*'a')
>>> f.tell()
10L
>>> f.write(100*'a')
>>> f.tell()
110L
</code></pre>