title: get filenames in a directory without extension - Python
body: <p>I am trying to get the filenames in a directory without getting the extension. With my current code - </p>
  
  <pre><code>import os
  
  path = '/Users/vivek/Desktop/buffer/xmlTest/' 
  files = os.listdir(path) 
  print (files)
  </code></pre>
  
  <p>I end up with an output like so:</p>
  
  <pre><code>['img_8111.jpg', 'img_8120.jpg', 'img_8127.jpg', 'img_8128.jpg', 'img_8129.jpg', 'img_8130.jpg']
  </code></pre>
  
  <p>However I want the output to look more like so:</p>
  
  <pre><code>['img_8111', 'img_8120', 'img_8127', 'img_8128', 'img_8129', 'img_8130']
  </code></pre>
  
  <p>How can I make this happen? </p>