A JavaScript collection of classic algorithms and data structures, each with explanations and further reading links.
TheAlgorithms/Python
A community-maintained collection of algorithms implemented in Python, intended for learning and education.
- Stars
- 225,421
- Forks
- 51,198
- Open issues
- 38
- Last commit
- 23 hours ago
What is it?
TheAlgorithms/Python is a large collection of algorithms and data structures implemented in Python, organized into directories by topic such as sorting, searching, graphs, and math. Each implementation is meant for learning, so the code favors readability and clarity over the performance of the Python standard library equivalents.
The project is community-driven and accepts contributions under a published contribution guide. A DIRECTORY file provides a navigable index of the implemented algorithms, and the project maintains a Discord channel where contributors and learners can ask questions.
It suits students studying algorithms, developers preparing for technical interviews, and educators who want reference Python code to explain how common algorithms work.
Key features
- 01Covers sorting, searching, graph, math, and other algorithm categories in Python.
- 02Code is written for education and readability rather than maximum performance.
- 03A DIRECTORY index helps navigate the implemented algorithms.
- 04Open to community contributions under a published contribution guide.
- 05Includes a Discord community for questions and discussion.
Use cases
- Studying how classic algorithms and data structures work in Python.
- Preparing for coding interviews by reviewing common algorithm implementations.
- Teaching algorithms with readable reference code in a classroom setting.
Things to know
- Implementations are for learning purposes and may be less efficient than the Python standard library.
Topics
FAQ
- What is Python?
- A community-maintained collection of algorithms implemented in Python, intended for learning and education. TheAlgorithms/Python is a large collection of algorithms and data structures implemented in Python, organized into directories by topic such as sorting, searching, graphs, and math. Each implementation is meant for learning, so the code favors readability and clarity over the performance of the Python standard library equivalents.
- Is Python free to use? What license does it have?
- Python is open source under the MIT license. Check the license terms before using it in commercial products.
- Is Python still maintained?
- Actively maintained. The last commit to Python was on Oct 20, 2026.
- What can I use Python for?
- Studying how classic algorithms and data structures work in Python. Preparing for coding interviews by reviewing common algorithm implementations. Teaching algorithms with readable reference code in a classroom setting.
- Where can I get Python?
- The source code and installation instructions are on GitHub: https://github.com/TheAlgorithms/Python
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A curated, bilingual-tagged list of online robotics courses, university lectures, books and hands-on resources for self-learners.
A free, open-source study guide for learning large-scale system design and preparing for system design interviews, with sample solutions and Anki flashcards.
A 12-week, 26-lesson beginner curriculum on classic machine learning using Scikit-learn, with Python and R lessons and quizzes.
A curated list of university-level computer science courses that include video lectures, organized by topic.
A collection of 54 single-file, dependency-free Python scripts that implement modern AI algorithms from scratch so their internals are readable.