I am sure there is a better way or writing this python function:
end_points = list(range(100))
filepath = 'something.csv'
with open(filepath) as fp:
cnt = 0
for line in fp:
end_points[cnt]=[x.strip() for x in line.split(',')]
cnt += 1
It works but it is not elegant. Is there a way of automatically refers to the current number of iteration in the for loop
?