A quick-reference guide for Python programming
Python is a high-level, interpreted, general-purpose programming language emphasizing readability and simplicity. It is widely used in web development, data science, AI/ML, automation, and scripting.
Version Python 3.x Paradigm OOP, Functional, Procedural Typing Dynamic
int, float, complex — numeric typesstr — immutable stringlist — mutable ordered collectiontuple — immutable ordered collectiondict — key-value pairsset — unordered unique elementsbool — True / Falseif / elif / elsefor item in iterablewhile conditionbreak, continue, passdeflambda x: x * 2@decoratorclass MyClass:def __init__(self)class Child(Parent)__str__, __repr__, __len___private and __name_mangling| Category | Library / Framework |
|---|---|
| Web | Django, Flask, FastAPI |
| Data Science | NumPy, Pandas, Matplotlib |
| Machine Learning | TensorFlow, PyTorch, scikit-learn |
| Automation | Selenium, Playwright, PyAutoGUI |
| Testing | pytest, unittest |
| API | requests, httpx |
deepcopy vs copywith statement)asyncio