title: Advanced Python list comprehension
body: <p>Given two lists:</p>
  
  <pre><code>chars = ['ab', 'bc', 'ca']
  words = ['abc', 'bca', 'dac', 'dbc', 'cba']
  </code></pre>
  
  <p>how can you use list comprehensions to generate a filtered list of <code>words</code> by the following condition: given that each word is of length <code>n</code> and <code>chars</code> is of length <code>n</code> as well, the filtered list should include only words that each <code>i</code>-th character is in the <code>i</code>-th string in <code>words</code>.</p>
  
  <p>In this case, we should get <code>['abc', 'bca']</code> as a result.</p>
  
  <p>(If this looks familiar to anyone, this was one of the questions in the previous Google code jam)</p>