I have a dictionary which contains a dictionary of lists:
data = {'team A': {'id': ['1', '2'], 'name': ['AAA', 'BBB']}, 'team B': {'id': ['3', '4'], 'name': ['XXX', 'YYY']}
I want to iterate over this dictionary and print values like:
|team A| 1 | AAA |
|team A| 2 | BBB |
|team B| 3 | XXX |
|team B| 4 | YYY |
How do I do this in Python?
I tried iterating over the main dictionary, but I'm struggling to print the values in the way I want it with the '|' in separate columns