I need to create a list of ranges in Python. The list will contain 100 values over range(100,5000,100)
. Each element of the list needs to contain 100 values. For example, L[0]
will be 0 to 100 in increments of 1, 0 - 200 will be in increments of 2, 0 - 5000 will be in increments of 50. I have the following code:
K = list(range(100,5000,100))
L = []
for i in K:
Q = list(range(100, i, int(i/100)))
L.append(Q)
This produces L
with elements that are not all of length 100 and not the desired sequences. I can't seem to figure this out. Please help! Thanks in advance!