Home > other >  How to make a numerical series with specific increment using python?
How to make a numerical series with specific increment using python?

Time:04-08

I want to create this series using python:

[0, 0.03, 0.07, 0.1, 0.13, 0.17, 0.2, 0.23, ......, 0.97, 1, .... 1.97, 2]

From 0 to 1, there must be 30 data points, and so on. So, the pattern is 0.03 0.04 0.03 0.03

Is there a built-in function for creating this kind of series? or what would the best algorithm be? Thank you

CodePudding user response:

yourSeries = [round(x/30,2) for x in range(0,61)]

...might be what you're after.

  • Related