Use list comprehensions when possible

Replace some for loops with list comprehensions for compacting

Change-Id: Ia80a013735c595d7c4d40172b34beb18b4383ee0
Merge "Use list comprehensions when possible"