I am a newbie to python and just learning things as i do my project and here i have two list of list which i need to compare and separate the diff found in A — > B and diff found b –> A
What is the best way of comparing.
A=[[1L, 'test_case_1'], [1L, 'test_case_2'], [2L, 'test_case_1']]
B=[[1L, 'test_case_1'], [1L, 'test_case_4'], [2L, 'test_case_1'], [2L, 'test_case_3']]
Assuming you can use a list of tuples as per my comment, this simple modification of Junuxx’s answer is much more efficient
A – B:
B – A: