title: Python requests - check if a particular header exists
body: <p>I am working with python <code>requests</code> module where I am getting  a url.</p>
  
  <p><code>response = requests.get(url)</code> </p>
  
  <p>This url has a set of headers where one particular header is sometimes there and sometimes not. I want to get the value of this header if it is there. I am using</p>
  
  <pre><code>retry_after = response.headers['Retry-After']
  </code></pre>
  
  <p>However when the header is not there an exception is thrown. what I want is something like this</p>
  
  <pre><code>If this header exists ( if header is not None)
      retry_after = response.header['Retry_After']
  </code></pre>
  
  <p>How can this be achieved with python <code>requests</code></p>