title: os.listdir() not printing out all files
body: <p>I've got a bunch of files and a few folders. I'm trying to append the zips to a list so I can extract those files in other part of the code. It never finds the zips.</p>
  
  <pre class="lang-python prettyprint-override"><code>for file in os.listdir(path):
       print(file)
       if file.split(".")[1] == 'zip':
       reg_zips.append(file)
  </code></pre>
  
  <p>The path is fine or it wouldn't print out anything. It picks up the same files each time but will not pick up any others. It picks up about 1/5th of the files in the directory.</p>
  
  <p>At a complete loss. I've made sure that some weird race condition with the file availability isn't the problem by putting a time.sleep(3) in the code. Didn't solve it.</p>