title: How to nest both lists and sets in dict in python3.x?
body: <p>I recently learned Python 3 and tried to define some complex data structures. Can someone help me with how to implement it?</p>
  <pre><code>import random
  from collections import defaultdict
  from pprint import pprint
  
  d1 = defaultdict(dict)
  
  d1['131']['all'] = [('1', 'a'), ('2', 'b'), ('3', 'c')]
  d1['131']['uniq'] = ('a', 'b', 'c')
  
  pprint(d1)
  
  # var = {
  #     'key': {
  #         'all': [(),(),()],
  #         'uniq': ()
  #     }
  # }
  
  d2 = ???
  
  num = [i for i in range(1, 27)]
  ch = [chr(i) for i in range(97, 123)]
  
  for i in num:
      d2[i]['all'].append((random.choice(num), random.choice(ch)))
      d2[i]['uniq'].add(random.choice(ch))
  
  pprint(d2)
  </code></pre>