title: Creating new dictionary from values in a previous dictionary
body: <p>I have the following function I have to write (with how I attempted to write it). Obviously there's something wrong with my code, or I wouldn't be posting here :) I know what is wrong based on the message it gives me when I try to use it, and I understand what it is - writing image_dict[0][1] doesn't work because the key isn't 0. I need to know how the exact key to use that but of course the key could be anything so I am wondering if I could easily change my code so that it works for any key. For example, could I put something in place of the 0 so that it works for all keys, rather than having to specify the exact key? Thanks!</p>
  
  <pre><code>def create_date_dict(image_dict):
  '''(dict) -&gt; dict
  
  Given an image dictionary, return a new dictionary
  where the key is a date and the value  is a list
  of filenames of images taken on that date.
  
  &gt;&gt;&gt; d = {'image1.jpg': ['UTSC', '2017-11-03','Happy Friday']}
  &gt;&gt;&gt; date_d = create_date_dict(d)
  &gt;&gt;&gt; date_d == {'2017-11-03': ['image1.jpg']}
  True
  '''
  result = {}
  for (k, v) in image_dict.items():
      result[image_dict[0][1]] = [image_dict[0]]
  return result
  </code></pre>