Skip to content

sahancodes/pythonpractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python Coding Practice 🐍

This repository contains Python practice exercises organized by topic.
The goal is to improve skills step by step through algorithms, OOP, async programming, refactoring, and more.


πŸ“‚ Project Structure

CODING_PRACTICE/
β”œβ”€β”€ algorithm_challenges/ β€” coding challenge solutions
β”œβ”€β”€ asyncio_sysprogram/ β€” async & system programming practice
β”œβ”€β”€ datastructs_algorithms/ β€” data structures & algorithms
β”œβ”€β”€ funcs_itertools/ β€” functions & itertools exercises
β”œβ”€β”€ internals_bestpractices/ β€” Python internals & best practices
β”œβ”€β”€ miniprojs/ β€” mini projects
β”œβ”€β”€ oop/ β€” object-oriented programming exercises
β”œβ”€β”€ python_fundamentals/ β€” basics & foundations
β”œβ”€β”€ refactoring/ β€” refactoring exercises
β”œβ”€β”€ test_performance/ β€” performance testing & benchmarking
β”œβ”€β”€ .venv/ β€” virtual environment
β”œβ”€β”€ .gitignore
β”œβ”€β”€ pyproject.toml β€” Black & Ruff configuration
β”œβ”€β”€ requirements.txt β€” dependencies
└── README.md β€” this file


βš™οΈ Setup Instructions

  1. Clone the repo
    git clone https://github.com/sahancodes/pythonpractice.git
    cd pythonpractice

  2. Create a virtual environment
    python -m venv .venv

  3. Activate it

    • Windows (PowerShell): .\.venv\Scripts\Activate.ps1
    • macOS/Linux: source .venv/bin/activate
  4. Install dependencies
    pip install -r requirements.txt


▢️ How to Run

Each folder contains focused exercises or projects. For example:

Run a script:
python python_fundamentals/example.py

Run tests:
pytest algorithm_challenges


πŸ› οΈ Tools Used

  • Python 3.x
  • pytest β€” for testing
  • Black β€” code formatter
  • Ruff β€” fast linter

πŸ“Œ Goals

  • Practice Python across different areas (fundamentals β†’ advanced).
  • Build reusable code and mini projects.
  • Learn clean coding practices with tests, linting, and formatting.
  • Explore performance testing, async, and Python internals.

πŸš€ Next Steps

  • Add more exercises regularly.
  • Expand miniprojs/ into larger applications.
  • Continue experimenting with new Python features.

πŸ‘¨β€πŸ’» Author: @sahancodes """

Save as README.md

output_path = "/mnt/data/README.md" with open(output_path, "w", encoding="utf-8") as f: f.write(readme_md)

output_path

About

Exercises to practice python programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages