A list comprehension creates a new list by transforming each element of an existing iterable. The basic syntax is [expression for item in iterable].
Instead of: python squares = [] for x in range(5): squares.append(x ** 2) Write: squares = [x ** 2 for x in range(5)], which produces [0, 1, 4, 9, 16]. The comprehension reads naturally: "x squared for each x in range ".
This pattern is more concise and often faster than the loop-and-append approach. You can transform any iterable: uppers = [s.upper() for s in words] uppercases a list of strings. List comprehensions are a hallmark of Pythonic code.