I am trying to update all values in column in a feature layer in ArcGIS Pro using arcpy.da.UpdateCursor, but I am getting the error: IndexError: list index out of range
I am trying to update all current values in the column "Dist_Next" with the values in the list distance_next_stop, i.e. the first row should be replaced with 19.32..., the second row with 73.84..., etc. The feature layer and the list contains the same amount of rows. What am I doing wrong here?
distance_next_stop = [19.320592048800002, 73.8492150239, 162.16051086800002, 0.361037751915, 162.295311589, 0]
with arcpy.da.UpdateCursor("out_stops", "Dist_Next") as cursor:
for row in cursor:
row = distance_next_stop[i]
cursor.updateRow(row)
The column "Dist_Next" in the feature layer "out_stops" that I want to update:

i. Try putting parens or braces aroundrow, since a list is expected in the updateCursor method. Note that it isn't safe to assume that rows will always be processed in physical order.