Use explicit loops instead of list comprehensions

Changes only the places where list comprehensions were used instead of loops
and their return values were not used

Change-Id: Ib518e77b26cf61cac4acb6a7e9b851aafffcd855
Merge "Use explicit loops instead of list comprehensions"