Hi how can I loop through n below, and get the dictionary elements in e if the elements are a match.
e = [(1001, 7005, {'length': 0.35, 'modes': 'cw', 'type': '99', 'lanes': 9}),
(1002, 8259, {'length': 0.35, 'modes': 'cw', 'type': '99', 'lanes': 9}), (1001, 14007, {'length': 0.35, 'modes': 'cw', 'type': '99', 'lanes': 9})]
n = [[(1001, 7005), (3275, 8925)], [(1598, 6009), (1001, 14007)]]
ie compare n and if n is in e print the dictionary
b = []
for d in n:
for items in d:
print b
outcome should be
output = [[{'length': 0.35, 'modes': 'cw', 'type': '99', 'lanes': 9}],[{'length': 0.35, 'modes': 'cw', 'type': '99', 'lanes': 9}]]