title: How to explain the reverse of a sequence by slice notation a[::-1]
body: <p>From the <a href="https://docs.python.org/2/tutorial/introduction.html" rel="noreferrer">python.org tutorial</a></p>
  
  <blockquote>
    <p>Slice indices have useful defaults; an omitted first index defaults to zero, an omitted second index defaults to the size of the string being sliced.</p>
  </blockquote>
  
  <pre><code>&gt;&gt;&gt; a = "hello"
  &gt;&gt;&gt; print(a[::-1])
  olleh
  </code></pre>
  
  <p>As the tutorial says <code>a[::-1]</code> should equals to <code>a[0:5:-1]</code></p>
  
  <p>but <code>a[0:5:-1]</code> is empty as follows:</p>
  
  <pre><code>&gt;&gt;&gt; print(len(a[0:5:-1]))
  0
  </code></pre>
  
  <p>The question is not a duplicate of <a href="https://stackoverflow.com/questions/509211/explain-slice-notation">explain-slice-notation</a>. That question is about the general use of slicing in python.</p>