title: How do I transform this dictionary in python?
body: <p>I'm getting results from an external API as a dictionary in the format:</p>
  
  <p><code>{data:[{values:[{'end_time':'2013-10-03T07:00:00+0000', value:{'mobile':4, 'search':3}}, {'end_time':'2013-10-04T07:00:00+0000', value:{'source':2}}]}]}</code></p>
  
  <p>and I want to transform it into a dictionary with the format: </p>
  
  <p><code>{'2013-10-03T07:00:00+0000':{'mobile':4, 'search':3},'2013-10-04T07:00:00+0000':{'source':2}}</code></p>
  
  <p>When I try the following, I get the error <code>SyntaxError: keyword can't be an expression</code> for the line starting with <code>output_dict</code>:</p>
  
  <pre><code>def dict_cleaner(input_dict):
      for day in input_dict['data'][0]['values'][0]['end_time']:
          output_dict = dict(input_dict['data'][0]['values'][0]['end_time']=input_dict['data'][0]['values'][0]['value'])
      return output_dict
  </code></pre>
  
  <p>What am I doing wrong here? </p>