<li><strong>Only required methods are getitem() and len().</strong></li>
<li><strong>Only required methods are getitem() and len().</strong></li>
<li><strong>Getitem() should return an item at the passed index or raise IndexError.</strong></li>
<li><strong>Getitem() should return an item at the passed index or raise IndexError.</strong></li>
<li><strong>Iter() and contains() automatically work on any object that has getitem() defined.</strong></li>
<li><strong>Iter() and contains() automatically work on any object that has getitem() defined.</strong></li>
<li><strong>Reversed() automatically works on any object that has getitem() and len() defined.</strong></li>
<li><strong>Reversed() automatically works on any object that has getitem() and len() defined. It returns reversed iterator of object's items.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileNotFoundError'</span></code> can be raised 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">'FileNotFoundError'</span></code> can be raised 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 raised when writing with <codeclass="python hljs"><spanclass="hljs-string">'x'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileExistsError'</span></code> can be raised when writing with <codeclass="python hljs"><spanclass="hljs-string">'x'</span></code>.</strong></li>
<pre><codeclass="python language-python hljs"><Path> = <Path>.parent <spanclass="hljs-comment"># Returns Path without the final component.</span>
<pre><codeclass="python language-python hljs"><Path> = <Path>.parent <spanclass="hljs-comment"># Returns Path without the final component.</span>
<str> = <Path>.name <spanclass="hljs-comment"># Returns final component as a string.</span>
<str> = <Path>.name <spanclass="hljs-comment"># Returns final component as a string.</span>
xxxxxxxxxx