title: python: what is best way to check multiple keys exists in a dictionary?
body: <p>my dict looks like</p>
  
  <pre><code>d = {
    'name': 'name',
    'date': 'date',
    'amount': 'amount',
    ...
  }
  </code></pre>
  
  <p>I want to test if <code>name</code> and <code>amount</code> exists, so I will do</p>
  
  <pre><code>if not `name` in d and not `amount` in d:
    raise ValueError # for example
  </code></pre>
  
  <p>Suppose I get the data from an api and I want to test if <code>10</code> of the fields exists in the dictionary or not.</p>
  
  <p>Is it still the best way to look for?</p>