title: Parsing apache log files
body: <p>I just started learning Python and would like to read an Apache log file and put parts of each line into different lists.</p>
  
  <p>line from the file</p>
  
  <blockquote>
    <p>172.16.0.3 - - [25/Sep/2002:14:04:19 +0200] "GET / HTTP/1.1" 401 - "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827"</p>
  </blockquote>
  
  <p>according to <a href="http://httpd.apache.org/docs/1.3/logs.html">Apache website</a> the format is </p>
  
  <blockquote>
    <p>%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\</p>
  </blockquote>
  
  <p>I'm able to open the file and just read it as it is but I don't know how to make it read in that format so I can put each part in a list.</p>