algorithms/itemBasedRecommender.py
def keyOnFirstItem(item_pair,item_sim_data):
    '''
    For each item-item pair, make the first item's id the key
    '''
    (item1_id,item2_id) = item_pair
    return item1_id,(item2_id,item_sim_data)

    For each item-item pair, make the first item's id the key
    
For each item-item pair, make the first item's id the key
For each item - item pair make the first item ' s id the key
def keyOnFirstItem(item_pair,item_sim_data):
    (item1_id,item2_id) = item_pair
    return item1_id,(item2_id,item_sim_data)
def keyOnFirstItem ( item_pair , item_sim_data ) : ( item1_id , item2_id ) = item_pair return item1_id , ( item2_id , item_sim_data )
For each item-item pair, make the first item's id the key
For each item - item pair make the first item ' s id the key
'''
    For each item-item pair, make the first item's id the key
    '''
item_pair
item_sim_data