title: Check if dictionary lists contain value and return keys
body: <p>I have a dictionary with a set of key:value pairs where the values are a lists like so:</p>
  
  <pre><code>my_dict = {7: [6, 13], 6: [7, 8, 9, 11, 13, 14], 8: [6, 14], 9: [6], 11: [6], 13: [6, 7], 14: [6, 8]}
  </code></pre>
  
  <p>I want to check which of the lists contain the value '6' and return the keys which correspond to the matches. (i.e. 7, 8, 9, 11, 13 and 14)</p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>def find_key_for(input_dict, value):    
      for k, v in input_dict.items():
          if v == value:
              yield k
          else:
              return "None"
  
  keys = list(find_key_for(my_dict, 6))
  </code></pre>
  
  <p>But it returns the following error:</p>
  
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>How can I work around this issue to return all the keys whos lists contain this value? Thanks</p>