title: How to replace values at specific indexes of a python list?
body: <p>If I have a list: </p>
  
  <pre><code>to_modify = [5,4,3,2,1,0]
  </code></pre>
  
  <p>And then declare two other lists:</p>
  
  <pre><code>indexes = [0,1,3,5]
  replacements = [0,0,0,0]
  </code></pre>
  
  <p>How can I take <code>to_modify</code>'s elements as index to <code>indexes</code>, then set corresponding elements in <code>to_modify</code> to <code>replacements</code>, i.e. after running, <code>indexes</code> should be <code>[0,0,3,0,1,0]</code>.</p>
  
  <p>Apparently, I can do this through a for loop:</p>
  
  <pre><code>for ind in to_modify:
      indexes[to_modify[ind]] = replacements[ind]
  </code></pre>
  
  <p>But is there other way to do this?
  Could I use <code>operator.itemgetter</code> somehow?</p>