CLN: Python comprehensions and generators cleanup followup
xref #18276, #18383
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Some multiline comprehensions and cleanups I missed in the two passes xref'd above. 
