title: How to gather ranges from a list?
body: <p>So I am having trouble thinking of a way to get different ranges from one list.
  The code is as follows:</p>
  
  <pre><code>data = [101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 115, 116, 117, 118, 119, 121]
  f_range = []
  </code></pre>
  
  <p>The output from the <code>print()</code> needs to look something like:</p>
  
  <pre class="lang-none prettyprint-override"><code>101-106, 108-112, 115-119, 121
  </code></pre>
  
  <p>I would need to group these be sequential increasing order. </p>