Every Sunday Jane goes to a local market to buy groceries for the upcoming week. When she makes her shopping list, she never puts everything down at once: she keeps track of what she wants to buy during the day. On Sunday morning her list looked like this:
to_buy = ['carrots', 'carrots', 'bread', 'tomatoes', 'onions', 'apples', 'tomatoes', 'carrots',
'tomatoes', 'onions', 'onions', 'onions', 'bread', 'milk', 'bread', 'apples']
Write a program that prints what she wants to buy and how many times she has added it to her shopping list, like in the example. The order of the items should be preserved.