Python Distance Matrix From The Back