I got two different lists (let’s call them A and B) of lists and I have to find the elements that are in B and not in A and viceversa. The lists inside the two main lists can be unordered and they basically contains strings. I’m looking for a code or an hint to solve this problem.
EDIT: I didn’t post the code because it was a lot stupid. However as requested, the code I tried:
for elem in list0:
if not (elem in list1):
for d in list1:
if not (d in list0):
/*stuff I got to do on the elements*/
EDIT2: test case:
A = [[a, b, c], [d, e, f]]
B = [[b, a, c], [a, o, p]]
I want to exec funct(A, B) and get as return value C = [[a, o, p]]. I also need the viceversa, D = [d, e, f].
If you input data is list of list of strings then you can use something like this:
EDITED as per comment:
EDITED: