title: Union of multiple ranges
body: <p>I have these ranges:</p>
  
  <pre><code>7,10
  11,13
  11,15
  14,20
  23,39
  </code></pre>
  
  <p>I need to perform a union of the overlapping ranges to give ranges that are not overlapping, so in the example:</p>
  
  <pre><code>7,20
  23,39
  </code></pre>
  
  <p>I've done this in Ruby where I have pushed the start and end of the range in array and sorted them and then perform union of the overlapping ranges.  Any quick way of doing this in Python?</p>