List comprehensions provide a concise way to create lists. Common applications are to make new lists where each element is the result of some operations applied to each member of another sequence or iterable, or to create a subsequence of those elements that satisfy a certain condition.
Basic Syntax
A list comprehension consists of brackets containing an expression followed by a for clause, then zero or more for or if clauses.