subtracting a list from a nested list closed

List comprehension:

x=[[1, 2, 4], [0, 3, 2]]
y=[2.3333333333333335, 1.6666666666666667]
print([[z-y_y for z in x_x] for x_x, y_y in zip(x, y)])

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top