title: List filtering and transformation
body: <p>I have a list of library filenames that I need to filter against regular expression and then extract version number from those that match. This is the obvious way to do that:</p>
  
  <pre><code>libs = ['libIce.so.33', 'libIce.so.3.3.1', 'libIce.so.32', 'libIce.so.3.2.0']
  versions = []
  regex = re.compile('libIce.so\.([0-9]+\.[0-9]+\.[0-9]+)')
  for l in libs:
      m = regex.match(l)
      if m:
          versions.append(m.group(1))
  </code></pre>
  
  <p>That produces the following list:</p>
  
  <pre><code>['3.3.1', '3.2.0']
  </code></pre>
  
  <p>Yet I feel that loop is not very 'Python style' and feel it should be possible to replace 'for' loop above with some smart one-liner.
  Suggestions?</p>