Address additional feedback for commit f7c0d3d on pull request 24.

Updated to use a generator instead of a list comprehension.