Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Gary Roach Newsgroups: comp.lang.python Subject: Duplicate Output Date: Tue, 26 Jan 2016 10:48:58 -0800 Lines: 22 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 3UMrEGkor/H4AJaX3urv7goGWd+d0dIb7ekK1t/cqEHA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.105 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.02; 'dirnames,': 0.16; 'received:206.46': 0.16; 'received:206.46.173': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subprocess': 0.16; 'to:name:python list': 0.16; 'duplicate': 0.18; 'import': 0.24; 'written': 0.24; 'header:User-Agent:1': 0.26; 'command': 0.26; 'prints': 0.29; 'code:': 0.29; 'code': 0.30; 'run': 0.33; 'to:addr :python-list': 0.36; 'list.': 0.37; 'doing': 0.38; 'wrong': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'header:MIME- version:1': 0.60; 'received:206': 0.63; 'walk': 0.72; 'received:192.168.1.7': 0.91; 'stretch': 0.91; 'kate': 0.95 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=btqxfxui c=1 sm=1 tr=0 a=AstGAA2XJoPAehtj9MTdvA==:117 a=IkcTkHD0fZMA:10 a=7aQ_Q-yQQ-AA:10 a=I_HWyHHdDhjYWmmJz8sA:9 a=QEXdDO2ut3YA:10 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 X-Mailman-Approved-At: Wed, 27 Jan 2016 03:38:53 -0500 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102146 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 [][] What am I doing wrong or how do I remove the duplicate list. Gary R.