擅长:python、mysql、java
<p>您需要关闭文件:</p>
<pre><code>>>> f.close()
</code></pre>
<p>另外,我建议在打开文件时使用<code>with</code>关键字:</p>
<pre><code>with open("/export/home/vignesh/resres.txt","w") as f:
f.write("hello world")
f.write("\t".join(["hello","world"]))
</code></pre>
<p>它会自动为你关闭它们。</p>