If you are just looking for the files in a single directory (ie you are not trying to traverse a directory tree, which it doesn’t look like), why not simply use os.listdir():
import os
for fn in os.listdir('.'):
if os.path.isfile(fn):
print (fn)
in place of os.walk(). You can specify a directory path as a parameter for os.listdir(). os.path.isfile() will determine if the given filename is for a file.