Python Double Nested For Loop List Comprehension With Conditions

Python Double Nested For Loop List Comprehension With Conditions