Which is a lot as you can do this in one line of bash. And have in the past for other reasons.
Something like;
find . -name "*.py" -exec cat {} + > output.txt
for file in `git ls-files`; do echo $file; cat $file; echo; echo -------; done