I'm new to Python and I have a simple question, say I have a list of items:
['apple','red','apple','red','red','pear']
Whats the simpliest way to add the list items to a dictionary and count how many times the item appears in the list.
So for the list above I would like the output to be:
{'apple': 2, 'red': 3, 'pear': 1}