How to sum date based dictionary values in python? : <p>I have the below dictionary format, I want to sum the dictionary values based on date.</p>

<pre><code>dict1 = [
            {'date':"10-05-2017", 'cost':20},
            {'date':"10-05-2017", 'cost':10},
            {'date':"11-05-2017", 'cost':15},
            {'date':"11-05-2017", 'cost':10},
            {'date':"12-05-2017", 'cost':5}
        ]
</code></pre>

<p>Result:</p>

<pre><code>[
    {'date':"10-05-2017", 'cost':30},
    {'date':"11-05-2017", 'cost':25},
    {'date':"12-05-2017", 'cost':5}
]
</code></pre>
