I am trying to combine 2 lists of pairs.
List 1:
dyndns = [('user1', 'dyndns1'), ('user2', 'dyddns2'), ('user3', 'dyndns3'), ('user4', 'dyddns4')]
List 2:
ip = [('user1', '1.1.1.1'), ('user2', '1.1.1.2'), ('user4', '1.1.1.4')]
I want to join List 1 to List 2, but only want to add the item from List 1 if it does not exist in List 2.
As you can see List 1 has user1, user2, user3 and user4, but List 2 only has user1, user2 and user4
The combined list has all users from List 2 as well as the extra users in List 1
Combined List:
combined = [('user1', '1.1.1.1'), ('user2', '1.1.1.2'), ('user3', 'dyndns3'), ('user4', '1.1.1.4')]