<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileNotFoundError'</span></code> can be risen when reading with <codeclass="python hljs"><spanclass="hljs-string">'r'</span></code> or <codeclass="python hljs"><spanclass="hljs-string">'r+'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileExistsError'</span></code> can be risen when writing with <codeclass="python hljs"><spanclass="hljs-string">'x'</span></code>.</strong></li>
</ul>
<h3id="file">File</h3>
<pre><codeclass="python language-python hljs"><file>.seek(<spanclass="hljs-number">0</span>) <spanclass="hljs-comment"># Moves to the start of the file.</span>
<file>.seek(offset) <spanclass="hljs-comment"># Moves 'offset' chars/bytes from the start.</span>