I've returned to writing in python after a long break from the language, I'm currently writing a program which takes latitude and longitude values, calculates the distance between them in kilometres and miles per hour, and calculates the time to get from one coordinate to the other, now I've got my program already to calculate the distances between coordinates and the time durations, and as a result I've got two lists to work with:
The first is a list of time durations to get from one location to the other in the format HH:MM:SS currently. As below
timeduration = ['0:07:11', '0:15:16', '0:18:17', '0:23:15']
and also a list of distances in kilometres which I've calculated from latitude/longitude coordinates
distances = ['0.6', '0.4', '1.3', '1.7']
What I would now like to do, is to now calculate these in python, however I'm at a bit of a loss as to the formula or approach which would be best suited to this.
I know if we took both of the first two values from both lists
e.g. timeduration[0] and distances[0], this should give us the mph speed
of 3.195623 mph or 5.14286 km/h. However I am at loss of how this would translate into python.