471,328 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,328 software developers and data experts.

Best way to add values from keys

I have a data structure that looks like this:

dates = {}; last_song = [] #; year = {}; week = {}; date = {};
artist = []; song = {}
# dates = {'2007': {'25': {'06/23/07': {'aerosmith': [{'sweet
emotion': 1}, {'dream on': 2}],
# 'Metallica': [{'Fade to
Black': 1}, {'Master of Puppets': 1}]},
# 'last_song': [Master of Puppets', 'Fade to Black',
'sweet emotion']}}}

What is the most effecient way to go through a week and determine how
many times each song was played?

Jul 12 '07 #1
0 688

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Karthikesh Raju | last post: by
3 posts views Thread by Sasha | last post: by
7 posts views Thread by Terry | last post: by
6 posts views Thread by Paul Rubin | last post: by
18 posts views Thread by Bob Stearns | last post: by
4 posts views Thread by brett | last post: by
9 posts views Thread by Peted | last post: by
13 posts views Thread by Nader | last post: by
12 posts views Thread by Florian Brucker | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.