I want to retrieve a list of files (filtered by extension) inside a directory (recursively).
I have the solution below but I am confident there is a cleaner way to do that. Probably a simple glob expression that I am missing but any better solution is fine. Better in this scenario is readability (self-documenting) not performance.
I know this example is very simple, but of course it is part of a more complex scenario.
files = glob.glob('documents/*.txt') + glob.glob('documents/**/*.txt')
I'd expect something like
files = glob.glob('playbooks/(**/)?*.yml')
(just an example, that does not work)