title: Iter not showing every file in directory
body: <p>This is my first post in Python. I'm currently teaching myself Python and the current section is iterators.</p>
  <p>I'm on a mac running catalina using Python 3.8.3</p>
  <p>My goal is to run a directory command for all Python (*.py) files in the current directory. I wrote this code:</p>
  <pre class="lang-py prettyprint-override"><code>import os
  files = os.popen('ls *.py')
  fileit = iter(files)
  for item in files:
      print(next(fileit), end='')
  </code></pre>
  <p>It prints a list of every other file and not every python file. What am I doing wrong?</p>
  <p>Thanks in advance!</p>