This section explains how to use lists in the Desmos Graphing Calculator.
By separating several values with commas and enclosing them in [], you can create a list to handle multiple values simultaneously.
Lists can contain not only values but also points (vectors), among other things. However, a single list can only contain items of the same type.
As explained later, this is a powerful tool for drawing multiple graphs at once.
Lists can be created in various ways.
By entering three periods, you can abbreviate arithmetic sequences. (Commas on both sides of the periods are optional.) Using this, you can also make the length of a list depend on other variables.
Additionally, you can use for, as explained later, to use list comprehensions.
If you are familiar with programming languages like Python, this syntax might feel somewhat familiar, though there are slight differences.
Lists can be embedded in various expressions. This allows you to draw multiple graphs at once. Think of it as iterating through the elements of the list one by one.
You can also include multiple lists in the same expression. In this case, instead of drawing all combinations of the lists, the elements are taken sequentially from each list.
In the above case, are the two points that will be drawn.
If you want to use all combinations of multiple lists, use for as explained next.
By using for, you can assign each element of a list to a variable one by one.
While this is no different from directly embedding the list in the expression, when used with multiple lists, it represents all combinations of the elements.
It is also useful for the aforementioned list comprehensions.
By appending [number] to a list, you can extract any element. (Numbers start from 1.)
This is particularly effective when used with functions like .
You can also extract multiple elements by specifying them with a list instead of a single number.
Additionally, you can extract elements that meet specific conditions by writing the condition inside [].
By writing [1,3,4].count, you can get the length of the list. (In this case, it would be 3.)