import datetime

# Horse = ['Sea Biscuit', '10:57:06', '10:58:42']

#My Function used to get times from the list and calculate speed in MPH

def get_speed(Horse):
    time1 = Horse[1]
    time2 = Horse[2]
    d = 1    #Assuming a distance of 1 mile
    FMT = '%H:%M:%S'
    tdelta = datetime.datetime.strptime(time2, FMT) - datetime.datetime.strptime(time1, FMT)
#Convert from timedelta HH:MM:SS format to hours by first converting to a string
    stringtime=str(tdelta)
    parts = stringtime.split(':')
    hours = int(parts[0])*1.0 + int(parts[1])/60.0 + int(parts[2])/3600.0

    speed = round((d/hours),2)

    Horse.append (speed)
    
    return Horse


Horses = [['Sea Biscuit', '10:57:06', '10:58:42'],['Red Rum', '10:57:06', '10:59:02'],['Blazing saddles', '10:57:06', '10:59:16']]

print(list(map(get_speed, Horses)))