title: Open expression in Python for a text file with unknown extension but same layout of the data inside of it
body: <p>I am writing a script in python that will read in data from a text file and perform various operations on the data. It is working perfectly if I specify the extension of my file in this statement <code>with open("file.txt") as f:</code>. My question is (and I don't even know if this is possible), I have to open a file that someone will provide to me but I let's assume that they will all provide it with different extensions (.txt, .rtf, .odt, .doc). All of the files will have the same layout which is for example:</p>
  
  <p>14
  Lucas,13
  Markus,7
  Peter,4</p>
  
  <p>So essentially:</p>
  
  <pre><code>integer
  string,integer
  string,integer
  string,integer
  </code></pre>
  
  <p>Is there a way to set the extension in <code>with open("file.txt") as f:</code> to something like <code>with open("file.*") as f:</code> that will process all the text files apart from their extension, given they have all the same layout. </p>