title: Find a file from a partial filename in python
body: <p>I am looking for a python script that will find the the exact filename of an existing file in the current directory that this python script will run from, that may be named incrementally.</p>
  
  <p>For example the file could be:
  <code>file1.dat</code>
  <code>file2.dat</code>
  <code>file3.dat</code>
  ....</p>
  
  <p>So we know that the file name starts with the prefix <code>file</code> and we know that it ends with the sufix <code>.dat</code>.</p>
  
  <p>But we don't know whether it will be <code>file1.dat</code> or <code>file1000.dat</code> or anything inbetween.</p>
  
  <p>So I need a script that will check in the range of say <code>1-1000</code> all filenames from <code>file1.dat</code> to <code>file1000.dat</code>, and if it finds the one that does exist in the directory, it returns a success message.</p>