mardi 4 août 2015

Python : Extract values of 1 day from a dictionnary with datetime keys [on hold]

I have a dictionnary with a datetime as key and a numbre as value.

dict = {'08/07/2015 01:15':'3', '08/07/2015 08:15':'5',
 '09/07/2015 07:15':'4', '09/07/2015 10:30':'8'}

I want extract values of each day. For example, on the 09/07/2015 I want this result :

result = {'09/07/2015 07:15': '4', '09/07/2015 10:30': '8'}

or

result = [4, 8]

Thank you for your help.

Aucun commentaire:

Enregistrer un commentaire