Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Best way to add values from keys

Reply
Thread Tools

Best way to add values from keys

 
 
robinsiebler@gmail.com
Guest
Posts: n/a
 
      07-12-2007
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to replace hash keys Alex Allmont Ruby 5 06-07-2011 10:12 AM
How to link foreign keys & primary keys using python? Harry George Python 9 06-13-2006 06:29 AM
can std::set hold pointers to keys instead of the keys themselves? danibe@my-deja.com C++ 10 02-03-2006 03:44 AM
serial keys/validation keys sandeep Kanwal C++ 1 10-29-2004 06:36 PM
keyboard keys replacing mouse keys? larry Computer Support 8 09-14-2003 07:32 PM



Advertisments