title: Assigning the same value to different positions in a list in python
body: <p>Assume that I have the following list in python:</p>
  
  <pre><code>x = [1,2,3,4,5,6,7,8,9,10]
  </code></pre>
  
  <p>I would like to assign the value 0 to specific positions on the list, for example positions 0, 7 and 9. Could I do something like the following in python without resorting to a loop?</p>
  
  <pre><code>x[0,7,9] = 0
  </code></pre>