I am counting the total occurrences of each item:
from collections import Counter
colors = ['green', 'blue', 'green', 'white', 'white']
colorTotals = Counter(colours)
print(colorTotals)
Running the code prints: Counter({'green': 2, 'white': 2, 'blue': 1})
but I only want to print the dictionary, something like: {'green': 2, 'white': 2, 'blue': 1}
How can I achieve this?