Duplicate Output

Gary Roach gary719_list1 at verizon.net
Tue Jan 26 13:48:58 EST 2016


Hi

Debian stretch OS
KDE Desktop
Code written with Kate
Run in command line with $python getFileNames.py

Code:

from os import walk
import subprocess

f = []
x = ""
for (dirpath, dirnames, filenames) in walk('.'):
     print(filenames)

This prints [<file list>][<duplicate file list>]

What am I doing wrong or how do I remove the duplicate list.

Gary R.



More information about the Python-list mailing list