os.path.walk() to get full path of all files

Laurent Claessens moky.math at gmail.com
Thu Mar 17 04:58:22 EDT 2011


> file_list = []
> for root, _, filenames in os.walk(root_path):
>       for filename in filenames:
>           file_list.append(os.path.join(root, filename))


What does the notation "_" stands for ? Is it a sort of /dev/null ?

I know that in the terminal it represents the last printed text.

Laurent



More information about the Python-list mailing list