
def sort_sales(data):
    #===== write your code below =======


def sales_summary(data):
    #===== write your code below =======


if __name__ == '__main__':

    data = [('apple', 5), ('beer', 2), ('pencil', 1), 
            ('beer', 2), ('book', 8), ('apple', 9),
            ('paper', 3), ('pencil', 13), ('orange', 6)]

    sorted_sales = sort_sales(data)
    summary = sales_summary(sorted_sales)     
