Welcome to data-structures-explained, part of the practice-python-for-beginners series.
This repository introduces Pythonβs core collection data types: list, tuple, set, and dict.
These are essential for organizing and managing data effectively in real-world Python programs.
Purpose:
Introduce beginners to Pythonβs fundamental data structures β how to create, modify, and use lists, tuples, sets, and dictionaries for practical programming tasks.
- Creating and modifying lists
- Using tuples for immutable collections
- Storing unique items in sets
- Managing key-value pairs in dictionaries
- Common built-in methods and best practices
data-structures-explained/
β
βββ LICENSE
βββ README.md
β
βββ exercises/
β βββ lists_example.py
β βββ tuples_example.py
β βββ sets_example.py
β βββ dictionaries_example.py
β βββ tests/
β βββ test_lists_example.py
β βββ test_tuples_example.py
β βββ test_sets_example.py
β βββ test_dictionaries_example.py
β
βββ requirements.txt
-
Clone the repo:
git clone https://github.com/practice-python-for-beginners/data-structures-explained.git cd data-structures-explained -
(Optional) Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run all tests:
pytest
By exploring the examples in this repository, learners will:
- Gain confidence in handling lists, tuples, sets, and dictionaries.
- Understand basic mutability and immutability.
- Use built-in Python functions (
len,sum,in, etc.) effectively. - Learn to perform add, remove, loop, and access operations.
All code in this repository is licensed under the GNU General Public License v3 (GPLv3).
See LICENSE for the full text.
Happy coding and exploring Python data structures!