I would like to create another dictionary where the output will be
new_dic = {key: len(value)}
Given a dictionary containing lists in its values.
Example:
dic = {'a':[1,2,3], 'b':[4,5], 'c':[6]}
And I want to create new_dic
from dic
where the new_dic
map keys to length of value like this:
new_dic = {'a':3, 'b':2, 'c':1}