title: Get value from dictionary for first key that exists
body: <h2>TL;DR</h2>
  
  <p>Is there a Python dictionary method or simple expression that returns a value for the first key (from a list of possible keys) that exists in a dictionary?</p>
  
  <h2>Details</h2>
  
  <p>Lets say I have a Python dictionary with a number of key-value pairs. The existence of any particular key not guaranteed.</p>
  
  <pre><code>d = {'A':1, 'B':2, 'D':4}
  </code></pre>
  
  <p>If I want to get a value for a given key, and return some other default value (e.g. <code>None</code>) if that key doesn't exist, I simply do:</p>
  
  <pre><code>my_value = d.get('C', None) # Returns None
  </code></pre>
  
  <p>But what if I want to check a number of possible keys before defaulting to a final default value? One way would be:</p>
  
  <pre><code>my_value = d.get('C', d.get('E', d.get('B', None))) # Returns 2
  </code></pre>
  
  <p>but this gets rather convoluted as the number of alternate keys increases.</p>
  
  <p>Is there a Python function that exists for this scenario? I imagine something like:</p>
  
  <pre><code>d.get_from_first_key_that_exists(('C', 'E', 'B'), None) # Should return 2
  </code></pre>
  
  <p>If such a method doesn't exist, is there a simple expression that is commonly used in such a scenario?</p>