title: Python remove duplicate value in a combined dictionary's list
body: <p>I need a little bit of homework help. I have to  write a function that combines several dictionaries into new dictionary. If a key appears more than once; the values corresponding to that key in the new dictionary should be a unique list. As an example this is what I have so far: </p>
  
  <pre><code>f = {'a': 'apple', 'c': 'cat', 'b': 'bat', 'd': 'dog'}
  g =  {'c': 'car', 'b': 'bat', 'e': 'elephant'}
  h = {'b': 'boy', 'd': 'deer'}
  r = {'a': 'adam'}
  
  def merge(*d):
      newdicts={}
      for dict in d:
          for k in dict.items():
              if k[0] in newdicts:
                  newdicts[k[0]].append(k[1])
              else:
                  newdicts[k[0]]=[k[1]]
      return newdicts
  
  combined = merge(f, g, h, r)
  print(combined)
  </code></pre>
  
  <p>The output looks like:</p>
  
  <p>{'a': ['apple', 'adam'], 'c': ['cat', 'car'], 'b': ['bat', 'bat', 'boy'], 'e': ['elephant'], 'd': ['dog', 'deer']}</p>
  
  <p>Under the 'b' key, 'bat' appears twice. How do I remove the duplicates?</p>
  
  <p>I've looked under filter, lambda but I couldn't figure out how to use with (maybe b/c it's a list in a dictionary?) </p>
  
  <p>Any help would be appreciated. And thank you in advance for all your help!</p>