title: Check if string ends with one of the strings from a list
body: <p>What is the pythonic way of writing the following code?</p>
  
  <pre><code>extensions = ['.mp3','.avi']
  file_name = 'test.mp3'
  
  for extension in extensions:
      if file_name.endswith(extension):
          #do stuff
  </code></pre>
  
  <p>I have a vague memory that the explicit declaration of the <code>for</code> loop can be avoided and be written in the <code>if</code> condition. Is this true?</p>