import operator


def process_addresses(address_list):
    """Determines how frequent each address appears out of all addresses found.

    Args:
        address_list: A list of organization information with addresses
            that was retrieved from ARIN.

    Returns:
        A list of lists, with the sub list containing two elements. Element one
        is a the frequency that the address appears and element two is the
        address. For example:

        [
         [0.75, '123 APPLE WAY, ANYTOWN, United States, 12345'],
         [0.25, '123 MAIN STREET, SPRINGFIELD, United States, 54321']
        ]
    """
    results = []
    for item in set(address_list):
        temp = []
        num = int(address_list.count(item))
        temp.append(num/float(len(address_list)))
        temp.append(item)
        results.append(temp)
    results = sorted(results, key=operator.itemgetter(0), reverse=True)
    return results