list_of_coords = [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10), (11, 12)]
[distance(*combo) for combo in combinations(list_of_coords, 2)]
How to iterate through a list of coordinates and calculate distance between them in Python