def generate_freq_list(d):  # dict
    """
    Generate a frequency list from a dictionary
    """
    total = sum(d.values())
    freq_list = sorted(d.items(), key=lambda x: x[1], reverse=True)
    return [(index+1, key, value, round(value/total, 2)) for index, (key, value) in enumerate(freq_list)]