CODEX
Python List Comprehension: One-Liner For Loops
Comprehensions offer a smooth approach for creating new sequences in a concise and readable way.
Python List Comprehension makes it possible to write concise one-liners for loops.
For instance, you can use a comprehension to replace this: