Install Python and Run Your First Program
A step-by-step setup guide for Python 3 on Windows, macOS, and Linux. Install the interpreter, set up VS Code, and write a working Python program in under ten minutes.
22 posts.
A step-by-step setup guide for Python 3 on Windows, macOS, and Linux. Install the interpreter, set up VS Code, and write a working Python program in under ten minutes.
A complete guide to Python's comparison and logical operators — equality vs identity, chained comparisons, short-circuit evaluation, and common pitfalls.
A practical guide to Python conditionals — if, elif, else, truthiness, conditional expressions, and the patterns that keep branching logic clean and readable.
An overview of every built-in data type in Python — int, float, str, bool, list, tuple, dict, set, and None — with examples and guidance on when to use each.
A practical guide to Python function arguments — defaults, keyword arguments, *args, **kwargs, positional-only and keyword-only parameters, and the mutable default gotcha.
A complete beginner's guide to Python dictionaries — creation, access, mutation, iteration, the essential methods, and the patterns that appear in nearly every real Python program.
A practical guide to Python exception handling — try, except, else, finally, raising and re-raising, custom exceptions, and the habits that make error handling helpful.
A practical guide to file I/O in Python — open modes, the with statement, reading and writing text and binary, working with paths, and handling common errors.
A practical guide to Python for loops — iterating over sequences, the range function, enumerate and zip, nested loops, and the idiomatic patterns you will use every day.
A practical guide to Python functions — defining with def, returning values, arguments and parameters, docstrings, and the habits that make functions worth reusing.
A complete beginner's guide to Python lists — creation, indexing, slicing, mutation, the essential methods, iteration patterns, and a first look at list comprehensions.
A practical guide to Python modules and imports — writing your own modules, import forms, packages, the if __name__ == '__main__' idiom, and avoiding common pitfalls.
A practical guide to integers, floats, arithmetic operators, operator precedence, the math module, and the floating-point gotchas every Python beginner should know.
A clear guide to Python variable scope — local, enclosing, global, and built-in names, the LEGB rule, and when to reach for the global and nonlocal keywords.
Learn how Python sets store unique values, the operations they support — union, intersection, difference — and when to choose a set over a list or dictionary.
A thorough introduction to Python strings — creation, escape sequences, indexing, slicing, the essential methods, f-strings, and why strings are immutable.
Understand Python's syntax rules, the role of indentation, statements, comments, and the most common syntax errors that trip up new developers.
A practical guide to Python tuples — creation, the single-element gotcha, packing and unpacking, methods, and when to choose a tuple over a list.
A practical guide to converting between Python types — int, float, str, bool, list, tuple, set, dict — when conversions fail, and the common pitfalls to avoid.
Learn how Python variables work, the rules and conventions for naming them, how dynamic typing changes the rules you may know from other languages, and the naming mistakes to avoid.
A clear guide to Python while loops — condition-driven iteration, break and continue, the else clause, infinite loops, and patterns for safe, terminating code.
A clear, professional introduction to Python — what it is, how it works, why it dominates modern software development, and what you can build with it as a beginner.