s = [[1, 10], [1.2, 11], [2, 5], [5, 15]] data = zip(*s) x_list = data[0] y_list = data[1] x_min = min(x_list) x_max = max(x_list) y_min = min(y_list) y_max = max(y_list) box = [x_min, x_max, y_min, y_max] print(box) # [1, 5, 5, 15]