On 6 Feb 2005 11:28:37 -0800, <[EMAIL PROTECTED]> wrote:
>
> walkList = [(x[0], x[2]) for x in os.walk(".")]
> filenames = []
> for dir, files in walkList:
> filenames.extend(["/".join([dir, f]) for f in files])Caleb Hattingh top-posted:
I would be interested to see an example of code that is more concise but yet as *clear* as the one you already have.
Out of curiosity, do you find:
filenames = [os.path.join(dirpath, filename)
for dirpath, _, filenames in os.walk('.')
for filename in filenames]harder to read?
Steve -- http://mail.python.org/mailman/listinfo/python-list
