мой код:
import csv
import math
forum = input("What was the name of the race?")
place = input("Where was the race?")
time = input("What was your time?")
length = int(input("What was the race length?"))
#pace = length/time
with open('times.csv', 'a', newline='') as f:
thewriter = csv.writer(f)
thewriter.writerow([index+1, forum, place, time, length])
#get the last index
for line in f:
index = int([line[0]-1])
индекс должен быть числом, показывающим, какая гонка чисел была. В качестве времени вводится значение для расчета темпа на милю, что нельзя сделать с помощью строки. и предложения?