Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have 2 list .I want to compare and get the difference.

Python
a = [['vlan 158', '  name MARKET', '  mode vpc'], []]


Python
b = [['vlan 158', '  name MARKETING', '  mode vpc'], ['vlan 159', '  name SALES', '  mode vpc']]


Expected Output :

Missing in "a"

vlan 159
  name SALES
  mode vpc


please suggest how can it be done?

Note : list "a" has Vlan 158 so as list "b" .So its a MATCH ,though "name" is different.not worried about that...

What I have tried:

Tried Many stuff but not getting the expected result
Posted
Updated 3-Aug-18 6:44am
v3
Comments
Richard MacCutchan 3-Aug-18 12:44pm    
"Tried Many stuff but not getting the expected result"
Try more stuff.

1 solution

 
Share this answer
 
Comments
Member 13933620 3-Aug-18 13:48pm    
i have already gone through that document...no luck.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900