You would use sum(range()) in a Python though. Remember that many things you do manually in JS have a better, automatic and faster way in the stlib.
Besides, if calculations are important, you would use numpy.
Besides, if calculations are important, you would use numpy.