title: Python. Replace elements using slice
body: <p>I need to implement Sieve of Eratosthenes algorithm.
  I have list:<br>
  <code>bar = [2, 3, 4, 5, 6, 7, 8, 9, 10]</code>
  <br>
  I need to replace each odd element with "0".
  Now I have code:</p>
  
  <pre><code>while viewIndex &lt; maxNumber:
      bar[viewIndex] = 0
      viewIndex += 2
  </code></pre>
  
  <p>But I remember about slices. And for me it will be nice to write something like this:</p>
  
  <pre><code>bar[currentIndex::2] = 0
  </code></pre>
  
  <p>But I have error:</p>
  
  <pre><code>TypeError: must assign iterable to extended slice
  </code></pre>
  
  <p>Maybe you know a beautiful solution to this task.
  </p>