import time


def sort_distances(movies: tuple) -> list:
    """
    Sorts the distances to get the best 10.

    Args:
        movies: movie_list from find_distance

    Returns:
        Sorted list
    """
    print("Sorting..", flush=True)
    start = time.time()

    print(f"Sorted in {round(time.time() - start, 3)} sec", flush=True)
    return sorted(list(movies), key=lambda x: x[1])[:10]