a=[[1,2],[3,4,5],[4,5]]
b=[[2,3],[4,5,6],[5,6]]
b-a
Excpected Output[[1,1],[1,1,1],[1,1]]
I am trying to do a difference between these two lists, but I am getting the error.
for i in a:
for j in b:
i-j
TypeError Traceback (most recent call last)
<ipython-input-27-c822a6dc04a2> in <module>()
1 for i in a:
2 for j in b:
----> 3 i-j
TypeError: unsupported operand type(s) for -: 'list' and 'list'
Can anyone help me with this?