title: Slice indices must be integers or None or have __index__ method
body: <p>I'm trying something with Python. I want to slice a list (plateau) in several list (L[i]) but I have the following error message:</p>
  
  <pre><code>  File "C:\Users\adescamp\Skycraper\skycraper.py", line 20, in &lt;module&gt;
      item = plateau[debut:fin]
  TypeError: slice indices must be integers or None or have an __index__ method
  </code></pre>
  
  <p>The concerned line is the one with <code>item = plateau[debut:fin]</code></p>
  
  <pre><code>from math import sqrt
  
  plateau = [2, 3, 1, 4, 1, 4, 2, 3, 4, 1, 3, 2, 3, 2, 4, 1]
  
  taille = sqrt(len(plateau))
  
  # Division en lignes
  L = []
  i = 1
  while i &lt; taille:
      fin = i * taille
      debut = fin - taille
      item = plateau[debut:fin]
      L.append(item)
      i += 1
  </code></pre>