title: What does the slice() function do in Python?
body: <p>First of all, I'd like to clarify the question: it's about the <a href="https://docs.python.org/3/library/functions.html#slice" rel="noreferrer"><code>slice()</code></a> function, <em>not</em> slices of lists or strings like <code>a[5:4:3]</code>.</p>
  
  <p>The docs mention that this function is used in NumPy and give no examples of usage (it's said <em>how to use it</em> but it's not said <em>when to use it</em>). Moreover, I've <em>never</em> seen this function used in any Python program.</p>
  
  <p>When should one use the <code>slice()</code> function when programming in plain Python (without NumPy or SciPy)? Any examples will be appreciated.</p>