title: Extracting Information from a Tuple (Python)
body: <p>I'm currently using the httplib library in Python 2.7 to obtain some headers from a website to establish a) the filesize of a download and b) the last modified date of the file. I've used some online tools and these details do exist.</p>
  
  <p>I'm currently scripting my Python code and it appears to work correctly bringing back the required information. Nonetheless, the response containing the header information is a list containing a number of tuples. A sample of the response is below:-</p>
  
  <pre><code>[('content-length', '2501479'),
   ('accept-ranges', 'bytes'),
   ('vary', 'Accept-Encoding'),
   ('server', 'off'),
   ('last-modified', 'Thu, 20 Oct 2011 04:30:01 GMT'),
   ('etag', '"2c8171a-262b67-4afb368edfffc"'),
   ('date', 'Thu, 20 Oct 2011 16:01:11 GMT'),
   ('content-type', 'text/plain')]
  </code></pre>
  
  <p>What I am looking to do is strip out basically the file size ("2501479") and the date ("Thu, 20 Oct 2011 04:30:01 GMT"). Any ideas how I can go about doing this? I originally tried <code>variable[0]</code> but this returns <code>"'content-length', '2501479'"</code>. How can I return the filesize solely (in theory the second part of the first tuple in the list!).</p>