Skip to main content
PProfileMatch

Python Fundamentals Tutorial

Learn Python by building small, realistic programs: types, logic, collections and files

Beginner4 lessonsabout 20 min of reading

This course is for people who want to read and write everyday Python without drowning in theory: career changers, students, analysts who keep copying scripts they do not fully understand, and developers from other languages who want a fast, honest tour. You only need Python 3 installed and any editor. Every example is a complete script you can save and run.

Instead of toy examples, each lesson works through one small scenario: a parcel-locker kiosk, a metro fare engine, a clinic's appointment book and a supplier-invoice importer. By the end you will be able to model data with the right built-in type, write functions that behave predictably, reshape collections with comprehensions, and read a messy file without the whole program crashing on the first bad row.

The lessons build on each other. First the syntax and the core types, including the traps around floats, strings and shared references. Then control flow and functions. Then the collection types and comprehensions that make Python concise. Finally files, exceptions and modules, which is where scripts turn into small tools you can reuse. If you are heading toward backend, data or automation work, this is the base the rest of the stack sits on.

Python Fundamentals lessons

  1. 1Python Syntax, Variables and Data Types for BeginnersLearn Python syntax, how variables really work, and the core data types (int, float, str, bool, None), with f-strings and the float and Decimal money trap.5 min read
  2. 2Python Control Flow and Functions: if, for, while, defPython if/elif/else, for and while loops, and functions with default arguments, *args, **kwargs and scope, built into a small metro fare calculator.5 min read
  3. 3Python Lists, Dictionaries, Sets and ComprehensionsLearn when to use a Python list, dict, set or tuple, how to loop and update each safely, and how list and dict comprehensions replace clumsy loops.5 min read
  4. 4Python File Handling, Exceptions and ModulesRead and write files with open and pathlib, handle errors with try/except/else/finally, parse CSV and JSON, and organise code into reusable modules.5 min read

Preparing for an interview? Practise Python interview questions

Learning Python Fundamentals to land a job? Browse open roles or check which skills are trending.