'''
Created on Nov 9, 2017

@author: rodger
'''

def createDictionary(songmap, songs):
    #todo
    for item in songs:
        [one, two,three] = item.split(":")
        if one not in songmap:
            songmap[one] = [1,0,0]
        else:
            songmap[one][0] += 1
        if two not in songmap:
            songmap[two] = [0,1,0]
        else:
            songmap[two][1] += 1
        if three not in songmap:
            songmap[three] = [0,0,1]
        else:
            songmap[three][2] += 1







            
#problem
songs = ["Hey Jude:Let it be:Day Tripper",
"Let it be:Drive my car:Hey Jude",
"I want to hold your hand:Help!:Day Tripper",
"Born to run:Thunder road:She's the one",
"Hungry heart:The river:Born to run",
"The river:Thunder road:Drive my car", 
"Angie:Start me up:Ruby Tuesday",
"Born to run:Angie:Drive my car"]

print songs
songmap = {}
createDictionary(songmap, songs)
print songmap

