Opening a file for append
<p>I just had a passing thought and figured what better place to ask then right here.  Out of curiosity, does anyone know if opening a file for append, like this:</p>

<pre><code>file_name = "abc"
file_handle = open(file_name,"a")
</code></pre>

<p>Is essentially the same as opening a file for writing and seeking to the end:</p>

<pre><code>file_name = "abc"
file_handle = open(file_name,"w")
file_handle.seek(0,2) # 0 for offset, 2 for end-of-file
</code></pre>

<p>I'm just wondering if opening a file for append is essentially doing the second block, open for write followed by a seek to the end of the file, behind the scenes.</p>
