How can I compare two multidimensional lists in python 2.6.6 and show the different elements.
I am trying to compare multidimensional list A with multidimensional list B and output the elements that are present in list A but not present in list B
aArray=[]
a1=[1],[2],[3]
a2=[1],[4],[5]
bArray=[]
b1=[1],[2],[3]
b2=[1],[6],[7]
aArray.append(a1)
aArray.append(a2)
aArray
[([1], [2], [3]), ([1], [4], [5])]
bArray.append(b1)
bArray.append(b2)
bArray
[([1], [2], [3]), ([1], [6], [7])]
aArray.difference(bArray)
Expected result:
([1],[4],[5])
actual result:
aArray.difference(bArray)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'list' object has no attribute 'difference'