title: Replace regex matches in a string with items from a list in order
body: <p>For example, I've got a string like:</p>
  
  <p><code>'blah blah    1.344 blah   1.455'</code></p>
  
  <p>and a list like:</p>
  
  <pre><code>[2.888, 4.033]
  </code></pre>
  
  <p>I know that the string and the list contain an equal quantity of numbers and want to replace all the numbers in the string with the numbers from the list using regex. I want something like:</p>
  
  <pre><code> re.sub('\d\.\d+', list[i], line)
  </code></pre>
  
  <p>but don't know how to make it replace each match with the next item from list, not just the same item. I want to preserve all of the text and all of the whitespace exactly the same, so splitting to a list, replacing by index and joining back seems not to be the thing I need.</p>