# Lists

Lists are very powerful tools that you can manipulate. Instead of referring to a single object, lists can refer to many objects at once. Lists can also be sorted, looped, or deleted as a whole, allowing for much more versatile and simpler options.

***

## What is a list?

A list is a collection of objects. Lists are often placed inside list variables, but they don't have to be stored like that in order to exist. Lists can be found whenever you refer to multiple objects.

For example;

{% code overflow="wrap" lineNumbers="true" %}

```python
loop (blocks in radius 5 around event-location):
  spawn 1 of creeper at loop-value's location
```

{% endcode %}

{% code overflow="wrap" lineNumbers="true" %}

```python
set {_blocks::*} to (blocks in radius 5 around event-location)
loop {_blocks::*}:
  spawn 1 of creeper at loop-value's location
```

{% endcode %}

In this example, the first code block has no list variables, but that doesn't mean there are no lists. In fact, these two snippets will have the exact same outcome. Simply, in the second section, the list is stored in a list variable, but in the original the list is just referred to in its raw form, without this medium.&#x20;

For simplicity's sake, this page will just use generic list variables, but these techniques will work for all lists, such as expressions.

***

## Manipulating lists

...

### Filters

You can filter lists to regulate which objects are included in a list.

{% hint style="info" %}
See the [List Filters page](/syntask/limiters/filters/list-filters.md) to learn how list filters work.
{% endhint %}

### Loops

See to-be-created loops page?

To Do:

input filters (see filters page)

loops

referring to all

sort/shuffle

nth elements


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://x8ight.gitbook.io/syntask/unfinished/lists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
