Data Structures in Python

Carson West

Mutable vs Immutable Types

Data Structures in Python

This note covers the fundamental data structures in Python. I’ll need to expand on several of these in separate notes.

1. Built-in Data Structures:

Python offers several built-in data structures:

my_list = 1, 2, "hello", 3.14, True]]
my_tuple = (1, 2, "hello", 3.14, True)
my_set = {1, 2, 3, 3, 4} # {1, 2, 3, 4}
my_dict = {"name": "Alice", "age": 30, "city": "[New York](./../new-york/)"}

2. Data Structure Operations:

Each data structure has its own set of operations (methods):

3. Choosing the Right Data Structure:

The choice of data structure depends on the specific needs of your program:

4. More Advanced Data Structures (Advanced Data Structures)

This section will cover more advanced data structures, like:

5. Further Reading:

Linked Notes: List Methods, Tuple Methods, Set Methods, Dictionary Methods, Advanced Data Structures