def get_centroid(points): x_list = [point[0] for point in points] y_list = [point[1] for point in points] x = sum(x_list) / len(x_list) y = sum(y_list) / len(y_list) return (x, y)