Using List Comprehension to Aggregate
2.11 · Lesson

Using List Comprehension to Aggregate

List comprehension enables you to extract values from an existing list. You can create a list by evaluating an expression that tests for list inclusion. In addition, you can modify the values returned in the list.

Here is an example where we simply return a subset of the list where the values in the countries list Full definition for property (opens in a new tab)A named value stored on a node or a relationship. are either USA or Germany or both: