title: How can I select all keys in a python dictionary?
body: <p>So I am trying to write an if statement that will check if the input given is not in dictionary[""];</p>
  
  <p>However I haven't found a way to select all keys to do this to, otherwise I will have to rewrite the if statement for about 20 keys which would be inefficient </p>
  
  <pre><code>if input_a not in dictionary.values():
      print('hi')
  if input_b not in dictionary.values():
      print('ho')
  </code></pre>
  
  <p>This will print ho and hi if i input a value which is in the dictionary or if i had a value that is not in the dictionary.</p>
  
  <p>However if i do:</p>
  
  <pre><code>if input_a not in dictionary["key1"]:
      print('hi')
  if input_b not in dictionary["key2"]:
      print('ho')
  </code></pre>
  
  <p>This will only print if input_a or input_b is in that specific key of values</p>
  
  <p>Let me also say that each key has several word values</p>