def add_pair_to_dict(key, value, dictionary):
 if (key in dictionary):
  dictionary[key].append(value)
 else:
  dictionary[key] = [value]

def add_pair_to_dict ( key , value , dictionary ) : if ( key in dictionary ) : dictionary [ key ] . append ( value ) else : dictionary [ key ] = [ value ]
add pair to the dictionary .