I want to sum the values of the second dictionary depending on the first dictionary. If I have dictionaries A and B.
A = {"Mark": ["a", "b", "c", "d"], "June": ["e", "a"], "John": ["a", "b", "f"]}
B = {"a": 1, "b": 2, "c": 3, "d": 0, "e": 3, "f": 2}
What the result should be is:
Mark=6, June = 4, John = 5
Thanks in advance