Best way to add values from keys

Discussion in 'Python' started by robinsiebler@gmail.com, Jul 12, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sandeep Kanwal

    serial keys/validation keys

    sandeep Kanwal, Oct 29, 2004, in forum: C++
    Replies:
    1
    Views:
    600
    Mike Wahler
    Oct 29, 2004
  2. Harry George
    Replies:
    9
    Views:
    746
    sonal
    Jun 13, 2006
  3. Replies:
    10
    Views:
    758
    Daniel T.
    Feb 3, 2006
  4. alan
    Replies:
    3
    Views:
    386
    Victor Bazarov
    Nov 28, 2007
  5. Alex Allmont

    Best way to replace hash keys

    Alex Allmont, Jun 3, 2011, in forum: Ruby
    Replies:
    5
    Views:
    467
    Alex Allmont
    Jun 7, 2011
Loading...

Share This Page