I have a number like 9970024
that comes from a total number of 249250621
and I would like to divide the 9970024
number into segments of equal range. That is, 0-9970024
is one iteration that I want to do and then next 9970024 +1 to 19940049 (from 9970025+9970024)
until it reaches to the total number which is 249250621
. How can I do such thing using python.
My initial try is as follows:
j = 0
x = 9970024
total = 249250621
while (j <= total):
for i in range(j,x):
j = j +1
j = i+1
x = x+j