hello I am trying to divide two lists of distance and time differences however sometimes the time difference is 0 I don't know how to account for this in list comprehension.
velocity = [j / i for i, j in zip(distance[1:], time_diff[:-1]) if time_diff[i] > 0]
I get this error for this implementation.
TypeError: list indices must be integers or slices, not float