Learn Python
at Painless Programming
Every Python tutorial on this site, organised by topic. From your first script to computer vision and data science — all free, no jargon.
New to Python? These are the right places to begin — a step-by-step tutorial and a comprehensive set of structured notes that take you from zero to writing real programs.
A Detailed Python Tutorial for Absolute Beginners
Learn Python step by step — variables, data types, loops, functions, and more. Written for complete beginners with clear examples throughout. The best first stop if you have never coded before.
Complete Python Programming Notes — Basic to Advanced
All ten units of Python in one structured resource — from the basics through to advanced topics. Designed for students who want a single reference they can follow beginning to end or dip into by topic.
Python Programming Notes
From complete beginner to 2D arrays — a focused set of notes covering the core language: basics, strings, lists, functions, and arrays. Good for revision and quick reference.
The language features every Python developer uses daily — working with files, storing data, and organising code with object-oriented programming.
File Handling in Python — A Complete Guide for Beginners
Read, write, and append files using Python. Covers open(), context managers, file modes, and working with text and binary files — the skill every real program needs.
Data Storage in Python — A Complete Guide for Beginners
Whether you are building a small script or a large application, you need to store and retrieve data. This guide covers files, JSON, SQLite, and when to use each approach.
OOP in Python — A Beginner's Guide
Classes, objects, inheritance, encapsulation, polymorphism — all four OOP pillars explained in Python. With real code examples and comparisons to help it actually make sense.
NumPy is the foundation of nearly every data and machine learning library in Python. Start here before Pandas, Matplotlib, or anything ML-related.
Five interconnected tutorials that build toward a complete face recognition system. Follow them in order — each one builds on the last — or jump to the specific library you need.
OpenCV in Python — A Full Tutorial for Beginners
Computer vision powers everything from facial recognition to autonomous vehicles. OpenCV is the starting point. This tutorial covers reading images, colour spaces, drawing, thresholding, and edge detection.
How to Work with Camera Feed in Python
Capture and process real-time video from a webcam using OpenCV. Covers VideoCapture, the frame loop, displaying output, and recording. A must-know for any live computer vision project.
Using dlib in Python — A Full Guide to Face Detection
dlib is a powerful C++ and Python toolkit for face detection and landmark prediction. Covers the HOG face detector, the 68-point landmark predictor, and face alignment for recognition accuracy.
Using the face_recognition Library in Python
Face recognition has gone from sci-fi to daily reality. This guide covers encoding faces into 128-dimensional vectors, comparing them, and tuning tolerance — the core of any recognition system.
Roadmap: Build a Facial Recognition System in Python
The complete project — four phases from foundation to a working real-time facial recognition system. Ties together OpenCV, dlib, and the face_recognition library into one end-to-end build.
