PythonFundamentals

Python Fundamentals Learning Path

Python tutorials & guides beginner / intermediate

Python fundamentals are not beginner topics you move past -- they are the mental models you rely on every time you write code. The Python Language Reference opens by stating that Python is designed to be highly readable and uses English keywords where other languages use punctuation. That design decision runs through everything in this collection: indentation defines scope, assignment is explicit, and the type system tells you exactly what it refuses to do. Understanding those choices at a real level -- not just memorizing syntax -- is what separates developers who can debug confidently from those who guess and check.

Python is dynamically typed, which means the interpreter binds a type to a value at runtime rather than at compile time. It is also strongly typed, which means it will not silently coerce one type into another the way JavaScript does. That combination produces a specific failure mode beginners hit constantly: they assume Python is flexible about types when it is actually strict about them and simply defers the check. The tutorials in this collection on variables, data types, truthy/falsy evaluation, and type conversion all address that gap directly.

The control flow section of this collection includes Python's structural pattern matching, introduced in Python 3.10 via PEP 634 (authored by Brandt Bucher and Guido van Rossum). The match/case statement is not a switch statement -- the PEP 635 rationale describes it as a generalized concept of iterable unpacking, capable of matching on structure, type, and value simultaneously. This collection also covers t-strings, which shipped in Python 3.14 (released October 7, 2025) via PEP 750. Unlike f-strings, which evaluate immediately to a plain string, a t-string evaluates to a string.templatelib.Template object -- preserving the interpolated parts separately so downstream code can process them safely. Both features reward understanding before use.

The 154 tutorials in this collection are organized from first-variable syntax through data structures, operators, conditionals, and the early OOP concepts that beginners encounter before they know what OOP is. Each tutorial includes working code you can run and modify. The goal is not to give you a vocabulary list -- it is to give you a model of how Python thinks so you can reason through code you have never seen before.

Tutorials marked with the cert badge include a final exam that awards a certificate of completion you can download and share.

Why 0.1 + 0.2 != 0.3 in Python

Floating-point representation, IEEE 754, and practical strategies for accurate decimal arithmetic in Python.

Beginner read()

Learn When You Absolutely Have to Use Floats in Python Programming: Absolute Beginners Tutorial

Learn when you absolutely have to use floats in Python. This beginner tutorial covers division, math functions, scientific constants, sensor data, and every scenario where integers simply will not work.

Beginner read()

How to Write Decimal Numbers in Python Code: Absolute Beginners Tutorial

Learn how to write decimal numbers in Python code. This beginner tutorial covers float literals, the decimal point, scientific notation, underscores, the float() function, and the decimal module with interactive examples.

Beginner read()

Learn How to Write Python Code with Whole Numbers: Absolute Beginners Tutorial

Learn how to write Python code with whole numbers in this absolute beginner tutorial. Covers integer creation, arithmetic operators, type conversion, and common mistakes with hands-on examples.

Beginner read()

Python Operators: Every Operator Explained with Examples

Arithmetic, comparison, logical, assignment, bitwise, membership, identity, and walrus operators with precedence rules.

Beginner read()

What Is a Boolean in Python: Absolute Beginners Tutorial

Learn what a Boolean is in Python, how True and False work, why bool is a subclass of int, and how Python decides which values are truthy or falsy. Beginner-friendly tutorial with interactive exercises.

Beginner read()

Python Exponentiation Tutorial

Learn Python exponentiation from scratch. This tutorial covers the ** operator, pow(), math.pow(), negative exponents, fractional exponents, and operator precedence with interactive examples.

Beginner cert read()

Python Hex, Octal, and Binary Integer Literals

Working with different number bases in Python -- hex, octal, and binary representations and conversions.

Beginner read()

Multiple Conditions in Python

Combining conditions with and, or, not, chained comparisons, and writing readable multi-condition logic.

Beginner read()

Python Identity Operators

Learn how Python identity operators is and is not work under the hood. Understand object identity, memory references, CPython interning, and when to use is versus == with clear examples.

Beginner cert read()

Python Membership Operators

Learn how Python membership operators in and not in work across strings, lists, tuples, sets, and dictionaries. Includes interactive exercises, code examples, and a final exam.

Beginner cert read()

Python Walrus Operator (:=) Tutorial

Learn how to use the Python walrus operator (:=) with clear examples covering while loops, list comprehensions, conditionals, and common pitfalls to avoid.

Intermediate cert read()

Python Compound Arithmetic Assignment Tutorial

Learn Python compound arithmetic assignment operators — +=, -=, *=, /=, //=, %=, and **= — with working code examples, interactive challenges, and a final exam.

Beginner cert read()

Learn What a Variable Type is in Python: Absolute Beginners Tutorial

Learn what a variable type is in Python with hands-on examples covering int, float, str, bool, list, and more. Absolute beginners tutorial with interactive exercises.

Beginner read()

Learn What a Data Type Is in Python: Absolute Beginners Tutorial

What data types are, why they matter, how to check them with type() and isinstance(), the core built-in types, mutable vs immutable, and type conversion -- with a crossword puzzle and hands-on exercises.

Beginner read()

Python Data Types: The Complete Guide to Every Built-In Type

A thorough guide to strings, integers, floats, booleans, lists, tuples, dictionaries, sets, and NoneType with practical code examples.

Beginner read()

What Strong Typing Means in Python

Why Python is strongly typed but dynamically typed, and what that means for how you write and debug code.

Beginner read()

Why Python Is Dynamically Typed

The design decisions behind Python's dynamic type system and how it affects performance, flexibility, and development speed.

Beginner read()

How Python Strong Typing Prevents Runtime Type Errors for Beginners

How Python's strong typing system raises errors when types collide, and how type hints with mypy catch those crashes before your code ever runs.

Beginner read()

Python Type Hints Without Breaking Dynamic Typing

How to use type annotations for clarity and tooling support without changing Python's runtime behavior — including what changed in Python 3.14 with PEP 649.

Intermediate read()

How Python Type Annotations Improve Code Readability and IDE Support

How type annotations improve readability, power IDE autocompletion, and enable static analysis with mypy and Pyright — including PEP history, Literal, Annotated, TypeVar, dataclasses, @overload, and 2024–2025 survey data.

Intermediate read()

Duck Typing vs Structural Typing in Python

Duck typing checks compatibility at runtime. Structural typing checks it before your code runs. How they differ, when each fails you, and how typing.Protocol bridges them.

Intermediate read()

Python Dynamic Typing and Performance: What the Cost Really Is

Why is Python slow? The real cost of dynamic typing — CPython's PyObject model, runtime dispatch overhead, benchmarks versus C, Java, and Rust, and the tools that close the gap. Covers Python 3.14 and JIT status in 2026.

Intermediate cert read()

What Happens When You Assign the Wrong Type to a Variable in Python

Python never raises an error at assignment time. Understand when type mismatches blow up at runtime, when they silently produce wrong results, why annotations don't stop them, and how to protect your code.

Beginner read()

TypeVar and Generic in Python: When and How to Use Them

TypeVar, Generic, and ParamSpec — when to use each, how bounded vs. constrained types differ, what PEP 695 bracket syntax changes in Python 3.12+, and why variance matters for mutable containers.

Intermediate read()

Learn How to Build a Dice Game in Python: Absolute Beginners Tutorial

Learn how to build a dice game in Python from scratch. This beginner tutorial covers the random module, while loops, input handling, and score tracking with interactive exercises.

Beginner read()

How to Build an Automatic File Organizer in Python: Absolute Beginners Tutorial

Build an automatic file organizer in Python that sorts files into folders by extension. Learn os, shutil, os.path.splitext, dictionaries, and for loops in this hands-on beginner tutorial.

Beginner read()

Learn How to Build a Number Guessing Game in Python: Absolute Beginners Tutorial

Learn to build a number guessing game in Python from scratch. This beginner tutorial covers while loops, if/elif/else, random numbers, and user input — all through one complete project.

Beginner read()

Learn How to Build the Rock, Paper, Scissors Game in Python: Absolute Beginners Tutorial

Learn how to build a Rock, Paper, Scissors game in Python from scratch. This absolute beginners tutorial covers random module usage, conditional logic, user input, and game loop design with interactive exercises.

Beginner read()

Build a Choose Your Own Adventure Script in Python: Absolute Beginners Tutorial

Learn Python from scratch by building a choose your own adventure game. This absolute beginners tutorial covers variables, input(), if/elif/else, and functions through hands-on script writing.

Beginner read()

Learn How to Build a Matchmaker Game in Python: Absolute Beginners Tutorial

Learn how to build a matchmaker game in Python from scratch. This absolute beginners tutorial covers lists, random, input(), functions, and loops through a complete working project.

Beginner read()

Learn How to Build a Text-Based Adventure Game in Python: Absolute Beginners Tutorial

Learn how to build a text-based adventure game in Python from scratch. This beginner tutorial covers variables, input(), if/elif/else, functions, loops, and dictionaries — all through a working game project.

Beginner read()

How to Build a Mad Libs Generator in Python: Absolute Beginners Tutorial

Build a Mad Libs generator in Python from scratch. Learn input(), variables, f-strings, and string concatenation by creating an interactive word game. Complete beginner tutorial with exercises.

Beginner read()

Learn How to Build a Website Update Notifier in Python: Absolute Beginners Tutorial

Learn how to build a website update notifier in Python from scratch. This absolute beginners tutorial covers HTTP requests, content hashing, polling loops, and desktop alerts — step by step.

Beginner read()

Learn How to Build a Simple Password Generator in Python: Absolute Beginners Tutorial

Learn how to build a simple password generator in Python from scratch. This absolute beginners tutorial covers strings, random, loops, and functions with interactive challenges.

Beginner read()

Learn How to Build a Simple Blockchain in Python: Absolute Beginners Tutorial

Learn how to build a simple blockchain in Python from scratch. This absolute beginners tutorial covers blocks, hashing, chains, and proof of work with working code examples.

Beginner read()

Learn How to Build a Payment Receipt Generator in Python: Absolute Beginners Tutorial

Learn how to build a payment receipt generator in Python from scratch. This absolute beginners tutorial covers functions, f-strings, lists, loops, and formatted output — step by step.

Beginner read()

Learn How to Build a Text Word Frequency Analyzer in Python: Absolute Beginners Tutorial

Learn how to build a text word frequency analyzer in Python from scratch. This absolute beginners tutorial covers strings, dictionaries, loops, and sorting with working code examples.

Beginner read()

Build a Wikipedia Rabbit Hole Explorer in Python: Absolute Beginners Tutorial

Learn to build a Wikipedia rabbit hole explorer in Python. This beginner tutorial covers the Wikipedia API, loops, functions, and lists — step by step with interactive exercises.

Beginner read()

Learn How to Build a Simple API Explorer in Python: Absolute Beginners Tutorial

Learn how to build a simple API explorer in Python from scratch. This absolute beginners tutorial covers HTTP requests, JSON parsing, the requests library, and reading live API data with clear code examples.

Beginner read()

Learn How to Build a Coding Journal in Python: Absolute Beginners Tutorial

Learn how to build a Python coding journal for absolute beginners. Write a program that prompts for a daily entry and automatically saves it to a text file with a timestamp.

Beginner read()

Learn How to Build a QR Code Generator in Python: Absolute Beginners Tutorial

Learn how to build a QR code generator in Python from scratch. This beginner tutorial covers installing qrcode, customizing colors and error correction, saving QR codes as images, and building a reusable generator function.

Beginner read()

Learn How to Build a Basic Calculator in Python: Absolute Beginners Tutorial

Learn how to build a basic calculator in Python from scratch. This beginner tutorial covers input, arithmetic operators, functions, and control flow with hands-on code examples.

Beginner read()

Learn How to Build a Transaction Analyzer in Python: Absolute Beginners Tutorial

Learn how to build a transaction analyzer in Python from scratch. This beginner tutorial covers lists, loops, conditionals, functions, and formatted output through a practical financial data project.

Beginner read()