T
T
Timebird2016-05-09 16:25:53
Python
Timebird, 2016-05-09 16:25:53

How to iterate over float elements?

Hello! A question. You need to go through the elements of the points_array array, and the elements in this array are of type float. I want to go from first to last element. How to act, because as I understand it, this method (which is below) is only for int values?
for i in range(points_array[0], points_array[-1]):

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Movchan, 2016-05-09
@Timebird

for f in points_array:
for f in points_array[1:5]:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question