From cc96235d9136a0d2b38c739d54b59e4bd3ac2ec5 Mon Sep 17 00:00:00 2001 From: yeshu Date: Fri, 7 Nov 2025 23:26:48 +0530 Subject: [PATCH] Added Usage Example section to README (Fixes #13714) --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 182d36a8d905..1cca95ae9775 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,20 @@ We are on [Discord](https://the-algorithms.com/discord) and [Gitter](https://git ## 📜 List of Algorithms See our [directory](DIRECTORY.md) for easier navigation and a better overview of the project. +## 🧩 Usage Example + +Here’s how you can clone this repository and run algorithms locally: + +1. **Clone the repository** + ```bash + git clone https://github.com/TheAlgorithms/Python.git + cd Python +2. **Run an algorithm** +python3 path/to/algorithm.py +3. **Use the interactive Python shell** + python3 +>>> from algorithms.category import algorithm_name +>>> algorithm_name(arguments) +4. **Run doctests to verify correctness** + python3 -m doctest -v path/to/algorithm.py +