I have a dictionary where each keys have multiple values.
I am trying to count the total number of values.
For example:
key: 1, value: abc, bcd, egf
key: 2, value: asj,asfah,afhs,jhsafh
so, the total number of values are 3+4 = 7
What is the pythonic way to get this count.
Thanks
How about:
Note that this uses a generator instead of creating a temporary list of lengths.