title: Substitute values in a list at multiple indices
body: <p>Suppose I have the list:</p>
  <pre><code>mylist = [0] * 46
  </code></pre>
  <p>I want to set <code>mylist[i] = 1</code>, for each index in the list</p>
  <pre><code>indices_list = [0, 30, 40, 41]
  </code></pre>
  <p>Right now, I'm using a simple and readable <code>for</code> loop, since in Python you cannot use a list of indices as indices in a list (i.e., <code>mylist[indices_list] = 1</code> is not valid Python code):</p>
  <pre><code>for i in indices_list:
      mylist[i] = 1
  </code></pre>
  <p>and it works nicely. However, I've been told that it would be better to use a list comprehension. Is this true? If so, how would I do it, and what would be the advantage with respect to my simple <code>for</code> loop?</p>