For loops replaced by List Comprehension.

Resending the pull request.