Python 3.3, a dictionary with key-value pairs in this form.
d = {'T1': ['eggs', 'bacon', 'sausage']}
The values are lists of variable length, and I need to iterate over the list items. This works:
count = 0
for l in d.values():
for i in l: count += 1
But it's ugly. There must be a more Pythonic way, but I can't seem to find it.
len(d.values())
produces 1. It's 1 list (DUH). Attempts with Counter from here give 'unhashable type' errors.