Mark said:
A simple example:
import os
path = '/home/bob/'
for f in os.listdir(path):
print f
A further clue for Elaine is:
listdir returns file "names". Files are things the OS has; names are
how we talk about the files to the OS. If you want to do anything with
the file, you'll have to decide what you want to do, and communicate the
_full_name_ of the file to the OS when you try to do it.
You can do that either by joining the path and file names, or by
changing the "working directory" so that the simple file name works.
Which you do depends on your overall goal.
This is purposely left a bit elliptical to leave you some work in
case this is a homework assignment.