The list type: range markup, looping, size, and how strings differ from real collections.
Lists are objects that may contain multiple values, and which can be iterated, enumerated, or looped by the template. A list of integers may be created using range markup: (start..end). For example, (1..5) creates a list of numbers from 1 to 5.
Most lists have a common type for all items, although not all lists are limited to a specific type — particularly lists that have been manipulated using filters and methods. Numerous object types may be treated as both a complex object and a list.
Strings are technically both a list and not a list. They can be enumerated with {% for %}, in which case each value is a single character. For most other purposes they are treated as a single value, so {% if "string" is_list %} evaluates to false.
A collection is a value you can loop with {% for %}, that reports how many items it holds (size), and that often exposes pagination metadata when it came from the CMS (total_count, page, limit, start).
Iterate with {% for %} and the forloop object (Control Flow). Narrow or reshape with List Filters. Fetch CMS lists with List methods, including {% entities %} and {% search %}. Creating and Using Collections walks through fetch, filter, loop, empty results, and pagination.
list
An enumerable collection of zero or more objects. Most lists contain a single object type, but some — especially after filters or methods — mix types. Many complex objects are also lists (for example an article list is both a complex object and a list of article objects).