I can tell you that at least in Python, for loops are not common for math. In fact, if I saw a C-style for loop counting indices, I’d defect it in any code I review.
For simple things, you have list comprehensions and things like “sum”, while for complex things one should reach for numpy.