> ## Documentation Index
> Fetch the complete documentation index at: https://python4ai.codewithsiva.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Data structures

> Store multiple values together

## Beyond single values

So far, you've stored one value per variable. But what if you need to store multiple values? That's where data structures come in.

Think of data structures as containers:

* **Lists**: Like a shopping list (ordered items)
* **Dictionaries**: Like a phone book (name > number)
* **Tuples**: Like coordinates (fixed values)
* **Sets**: Like a bag of unique items

## The main structures

<CardGroup cols={2}>
  <Card title="Lists" icon="list" href="/data-structures/lists">
    Ordered, changeable collections
  </Card>

  <Card title="Dictionaries" icon="book" href="/data-structures/dictionaries">
    Key-value pairs for fast lookup
  </Card>

  <Card title="Tuples" icon="lock" href="/data-structures/tuples">
    Ordered, unchangeable collections
  </Card>

  <Card title="Sets" icon="circle-nodes" href="/data-structures/sets">
    Unique values only
  </Card>
</CardGroup>

## Which one to use?

* **Lists**: When order matters and you need to change items
* **Dictionaries**: When you need to look up values by name
* **Tuples**: When data shouldn't change (like coordinates)
* **Sets**: When you only care about unique values

<Tip>
  Python counts from 0, not 1! The first item in any collection is at position 0, the second at position 1, and so on. This is called "zero-based indexing" and you'll see it throughout Python.
</Tip>

## Start learning

Lists are the most common data structure - let's start there!

<Card title="Learn about lists" icon="arrow-right" href="/data-structures/lists">
  Your first data structure
</Card>
