擅长:python、mysql、java
<p>在这个链接中有很好的解释:<a href="http://www.tutorialspoint.com/python/python_files_io.htm" rel="nofollow">http://www.tutorialspoint.com/python/python_files_io.htm</a>,请参阅<strong>语法部分。你知道吗</p>
<p>要使用pickle再次打开文件,您需要这样编码:</p>
<pre><code>data = pickle.load(open("\path\filename.txt","r")) # For only read file
</code></pre>
<p>对于附加文件,使用模式“a”,或附加和读取使用“a+”</p>