title: How to select files with numbered extensions from a folder?
body: <p>I am trying to build my own dataset for a project. Therefore I need to select  files that have been exported from another program and come with numbered extensions:</p>
  
  <pre><code>exported_file_1_aaa.001
  exported_file_2_aaa.002
  exported_file_3_aaa.003
  ...
  exported_file_5_zzz.925
  ...and so on.
  </code></pre>
  
  <p>I know how to select files with a specific extension e.g. '.txt' from a folder and append it to a list or dict. Is there any way to solve this with '.nnn'</p>
  
  <pre><code>ext = '.nnn'
  all_files = [i for i in os.listdir(dir) if os.path.splitext(i)[1] == ext]
  for f in all_files:
      ...
  </code></pre>