input: Write a python function to generate distances between coordinates.
  assert generate_distances([(0, 0), (1, 1), (2, 2)])==[[0, 1, 1.4142135623730951], [0, 2, 2.8284271247461903], [1, 0, 1.4142135623730951], [1, 2, 1.4142135623730951], [2, 0, 2.8284271247461903], [2, 1, 1.4142135623730951]]
  assert generate_distances([(1, 1), (1, 2), (1, 3)])==[[0, 1, 1.0], [0, 2, 2.0], [1, 0, 1.0], [1, 2, 1.0], [2, 0, 2.0], [2, 1, 1.0]]
output: import math
  
  def generate_distances(coords):
      distances = []
      for i, (x1, y1) in enumerate(coords):
          for j, (x2, y2) in enumerate(coords):
              if i != j:
                  dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
                  distances.append([i, j, dist])
      return distances