Learn how to download and install Python on Windows, macOS, and Linux, verify your installation, and launch the interactive REPL.
Tutorial series
Python Fundamentals
15 tutorials — follow in order for the best learning path.
- Installing Python on Your Computer
- Getting Started with Python
Write and run your first Python script, use the interactive REPL, and learn about print(), comments, strings, and numbers.
- Python Basics: Variables, Types, and Operators
Master Python basics: variables, data types, and operators with clear examples. See how dynamic typing and f-strings make everyday coding cleaner.
- Control Flow: if, for, and while in Python
Master Python control flow with if/elif/else decisions, for and while loops, break and continue statements, and the loop else clause for cleaner program logic.
- Writing Functions in Python
Master writing functions in Python — covers def, parameters, return values, scope, args and kwargs, docstrings, and best practices for clean reusable code.
- Lists, Tuples, and Dictionaries
Learn how Python's lists, tuples, and dictionaries work so you can pick the right one every time. Covers indexing, slicing, unpacking, and iteration patterns.
- Working with Python Modules and Imports
Organize Python code into modules and packages, master the import system, and use the standard library effectively for building maintainable applications.
- Python Classes and Objects: A Beginner's Guide to OOP
Learn Python classes and objects from scratch. Covers constructors, instance attributes, methods, and self with practical inventory and bank account examples.
- Reading and Writing Files in Python
Learn how to read from and write to files in Python using built-in functions and pathlib. Covers text and binary files, context managers, and common patterns.
- Handling Errors and Exceptions
Master handling errors in Python with try/except blocks, custom exceptions, and production-ready patterns for building applications that fail gracefully.
- List, Dict, and Set Comprehensions
Learn how to use list, dict, and set comprehensions in Python. Covers basic syntax, filtering, and nested loops.
- *args and **kwargs Explained
Learn how to use *args and **kwargs in Python to write flexible functions that accept any number of positional and keyword arguments.
- How to Join a List into a String in Python
Learn how to convert a list to a string in Python using str.join() with practical examples for different data types and separators.
- String Formatting with f-strings in Python
Learn how to use f-strings to embed variables and expressions inside strings, format numbers with precision, and compare with other formatting methods
- Recursion in Python
Learn how to write recursive functions in Python, understand base cases and recursive cases, and see practical examples like factorial and Fibonacci.