Replace 2-depth 'for' loop by a 2-level list comprehension 'for'.