I\'m trying to get a list of all log files (.log) in directory, including all subdirectories.
A single line solution using only (nested) list comprehension:
import os path_list = [os.path.join(dirpath,filename) for dirpath, _, filenames in os.walk('.') for filename in filenames if filename.endswith('.log')]