title: Dividing Number into Segments of knowing Ranges using Python
body: <p>I have a number like <code>9970024</code> that comes from a total number of <code>249250621</code> and I would like to divide the <code>9970024</code> number into segments of equal range. That is, <code>0-9970024</code> is one iteration that I want to do and then next <code>9970024 +1 to 19940049 (from 9970025+9970024)</code> until it reaches to the total number which is <code>249250621</code>. How can I do such thing using python. </p>
  
  <p>My initial try is as follows:</p>
  
  <pre><code>j = 0
  x = 9970024
  total = 249250621
  while (j &lt;= total):
   for i in range(j,x):
    j = j +1
   j = i+1
   x = x+j
  </code></pre>