element wise subtraction python list
import numpy as np a = [2,2,2] b = [1,1,1] np.subtract(a,b)
Here is what the above code is Doing:
1. We are creating two lists, a and b.
2. We are using the numpy library to subtract the two lists.
3. We are printing the result.