# trekhleb/learn-python

📚 Playground and cheatsheet for learning Python. Collection of Python scripts that are split by topics and contain code examples with explanations.

Repository: https://github.com/trekhleb/learn-python
Canonical: https://ross.abutalabs.com/products/learn-python
Language: Python
License: MIT
License Family: permissive
Topics: python, python3, learning, programming-language, learning-python, learning-by-doing
Last push: 2026-04-06T16:03:15+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 76, release rhythm 35, longevity 100
- inputs: {"age_days": 2926, "days_push": 149, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 18225, forks 2976 (observed 2026-08-28T04:11:26.450313+00:00)

## What it is
A collection of Python scripts organized by topic that serve as a playground and cheatsheet for learning Python. Each script contains commented code examples with assertions that illustrate expected outputs, plus links to further reading.

## Use cases
- learn python from scratch
- python syntax cheatsheet
- practice python by running examples
- recap python standard library constructs
- learn python basics with runnable examples
- interactive python learning playground

## When to choose
- you are a beginner learning Python syntax through runnable examples
- you want a quick reference to recap Python constructs
- you prefer learning by modifying and testing code with assertions

## When to avoid
- you need a comprehensive Python reference or official documentation
- you are looking for advanced or production-grade Python patterns
- you want structured courses with exercises and grading

## Facets
- artifact type: learning-resource
- maturity: active
- function: developer-tools
- domain: education, programming-languages
- platform: python, cross-platform
- tags: cheatsheet, playground, tutorials, python3

## Member repositories
- trekhleb/learn-python (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:26.450313+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:02:07.031118+00:00, confidence not recorded.
  - readme: https://github.com/trekhleb/learn-python (fetched 2026-08-28T04:11:26.450313+00:00, sha 3927c18522d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
