How do I code a function in python which can:

* iterate through a list of word strings which may contain duplicate words and referencing to a dictionary,
* find the word with the highest absolute sum, and
* output it along with the corresponding absolute value.
* The function also has to ignore words which are not in the dictionary.

For example,  

Assume the function is called `H_abs_W()`.  

Given the following list and dict:

```
list_1 = ['apples','oranges','pears','apples'] 
Dict_1 = {'apples':5.23,'pears':-7.62}

```

Then calling the function as:

```
H_abs_W(list_1,Dict_1)

```

Should give the output:

> 
> 'apples',10.46
> 
> 
> 

EDIT:
I managed to do it in the end with the code below. Looking over the answers, turns out I could have done it in a shorter fashion, lol.

```
def H_abs_W(list_1,Dict_1):

    freqW = {}
    for char in list_1:
        if char in freqW:
            freqW[char] += 1
        else:
            freqW[char] = 1

    ASum_W = 0
    i_word = ''
    for a,b in freqW.items():
            x = 0
            d = Dict_1.get(a,0)
            x = abs(float(b)*float(d))
            if x > ASum_W:
                ASum_W = x
                i_word = a

    return(i_word,ASum_W)

```