title: Why use some_string[-1:] instead of some_string[-1]?
body: <pre><code>foo = 'eggs'
  
  foo[:1] # the same is foo[0]
  foo[-1:] # the same is foo[-1]
  </code></pre>
  
  <p>Is there any advantage of one of these ways?</p>
  
  <p>I ran into this over here
  <a href="https://hg.python.org/cpython/file/3.4/Lib/xml/etree/ElementPath.py#l254" rel="nofollow">https://hg.python.org/cpython/file/3.4/Lib/xml/etree/ElementPath.py#l254</a></p>
  
  <p>UPD. Can you go to the link? The variable path is a string there. And I was confused, why they were using a slice instead of a concreate index.</p>
  
  <pre><code>if path[-1:] == "/":
  </code></pre>