I have this dictionary:
a = {'Jimmy': [['5', '7', '5'], ['S', 'F', 'R']],
'Limerick': [['8', '8', '5', '5', '8'], ['A', 'A', 'B', 'B', 'A']]}
I want the end product to be a dictionary with tuples of tuples, but I think the second loop is not working.
What I want:
a = {'Jimmy': (('5', '7', '5'), ('S', 'F', 'R')),
'Limerick': (('8', '8', '5', '5', '8'), ('A', 'A', 'B', 'B', 'A'))}
Can anyone help me to see what I'm doing wrong?
I tried:
a = {'Jimmy': [['5', '7', '5'], ['S', 'F', 'R']],
'Limerick': [['8', '8', '5', '5', '8'], ['A', 'A', 'B', 'B', 'A']]}
for key in a:
a[key] = tuple(a[key])
for value in a[key]:
value = tuple(value)
print(a)
but it didn't work.