0

I have a dictionary, with a year as the first key, and dictionary as the value, with a name the key for that dictionary, and a list of tuples as the value for the inner-dictionary, like so:

dictionary={2009:{Adam:[(a,b,c,d),(e,f,g,h)]}

How can I assign variables for different values with the list of tuples? For example, if I want:

var_1=a
var_2=c
var_3=g

How can I assign them? I've tried for loops, but seem to get stuck, and the list of tuples within the dictionary aspect is probably not helping the organization.

Marty
  • 87
  • 1
  • 6
  • You want to assign them all to variables ? is theere a pattern youre expecting ? – scharette Nov 14 '17 at 02:27
  • I think I will need to use them all, so a pattern would be expected. I just used 3 variables as an example, but the dictionary has multiple keys, and even more sub-keys. I filter them by the first key, and then go from there printing certain values as I need to. – Marty Nov 14 '17 at 02:29

0 Answers0