Free course · No signup
Learn Python from scratch
Go from your first line of code to functions, classes, testing, and real projects with short, practical lessons. Each one explains an idea and gives you code you can run yourself.
- Python 3
- VS Code
- uv
- pytest
- Flask
- Lessons
- 32
- Levels
- 4
- Hours of reading
- ~5
- Cost
- Free
What you will learn
Each lesson explains one idea and shows working code, so you learn by running and changing real examples.
Write your first programs
Variables, data types, input, conditions, and loops: the building blocks of every program.
Organize your code
Use lists, dictionaries, functions, and classes to keep programs short and readable.
Work with files and errors
Read and write files, handle CSV and JSON, and deal with errors without crashing.
Test your code
Write tests with pytest so you can change code without breaking it.
Set up a real workflow
Use VS Code, virtual environments, uv, and .env files the way working developers do.
Build real things
Scrape websites, build a web app with Flask, work with databases, and package it in Docker.
Course curriculum
Work through the lessons in order, or jump to the level that matches where you are.
Level 1: Python Basics
Variables, data types, lists, conditions, loops, functions, classes, files, and tests.
- Lesson 1: Python Basics: What Every Beginner Should KnowNew to Python? Learn the core Python basics every beginner should know — variables, data types, loops, functions, and more. 6 min read
- Lesson 2: Python Basics: Variables and Data TypesPart 2 of Python Basics: variables, naming, strings, numbers, booleans, None, lists, tuples, dictionaries, and sets, with common beginner mistakes. 15 min read
- Lesson 3: Python Basics: Lists and DictionariesPart 3 of Python Basics: master lists and dictionaries, including sorting, enumerate, comprehensions, nested data, and lists of dictionaries. 15 min read
- Lesson 4: Python Basics: If StatementPart 4 of Python Basics: if, elif, and else, comparison and logical operators, nested conditions, match statements, and common beginner mistakes. 13 min read
- Lesson 5: Python Basics: User Input and While LoopsPart 5 of Python Basics: get input with input(), validate it, and use while loops with break and continue while avoiding infinite loops. 14 min read
- Lesson 6: Python Basics: FunctionsPart 6 of Python Basics: write functions with parameters, default values, return values, scope, *args and **kwargs, lambdas, and modules. 15 min read
- Lesson 7: Python Basics: ClassesPart 7 of Python Basics: classes and objects, __init__ and self, attributes and methods, inheritance, composition, and dataclasses. 15 min read
- Lesson 8: Python Basics: Files and ExceptionsPart 8 of Python Basics: read and write files, work with CSV and JSON, and handle errors with try, except, else, and finally. 15 min read
- Lesson 9: Python Basics: Testing Your CodePart 9 of Python Basics: test your code with pytest, from your first test to parametrized tests, fixtures, and good testing habits. 14 min read
Level 2: Setup and Tools
Set up your editor and environments, manage packages and secrets, and tour the libraries you will use.
- Lesson 10: What Is Visual Studio Code (VS Code)? Features and How to StartVisual Studio Code is a free code editor from Microsoft for Windows, macOS, and Linux. See what it does, how to install it, and write your first program. 13 min read
- Lesson 11: Python Virtual Environments: Setup Guide & Best PracticesLearn how to create and manage Python virtual environments with venv, plus setup steps for Windows, macOS, Linux, and a cheat sheet. 5 min read
- Lesson 12: Python uv: A Faster Way to Manage Projects and DependenciesLearn how to use Python uv to create projects, manage dependencies, and keep reproducible lockfiles with a fast, modern workflow. 7 min read
- Lesson 13: The Importance of the .env File in Python ProjectsLearn why .env files matter in Python projects — keeping API keys and secrets out of your code, with setup steps and best practices. 6 min read
- Lesson 14: Python for Everything: 10 Libraries Every Beginner Should KnowA beginner-friendly tour of 10 popular Python libraries, from Pandas and Matplotlib to Flask, Django, and OpenCV, and what each one is best at. 5 min read
Level 3: Practice Projects
Small projects from the 100 Days of Python challenge that put the basics to work.
- Lesson 15: 100 Days of Python Challenge: A Beginner's GuideLearn how the 100 Days of Python challenge works, what projects it includes, and how daily practice can strengthen your Python skills. 6 min read
- Lesson 16: 100 Days of Python: Day 000 Band Name GeneratorExplore Day 000 of the 100 Days of Python challenge, a beginner Band Name Generator built with variables, user input, and string concatenation. 5 min read
- Lesson 17: 100 Days of Python: Day 001 Tip CalculatorExplore Day 001 of the 100 Days of Python challenge, a tip calculator that practices numeric input, percentages, and formatted output. 5 min read
- Lesson 18: 100 Days of Python: Day 002 Pyramid Escape RoomExplore Day 002 of the 100 Days of Python challenge, an interactive Pyramid Escape Room built with conditional logic and nested decisions. 6 min read
- Lesson 19: 100 Days of Python: Day 003 Rock Paper ScissorsExplore Day 003 of the 100 Days of Python challenge, a terminal Rock Paper Scissors game using random choices, lists, and conditionals. 5 min read
- Lesson 20: 100 Days of Python: Day 004 Password GeneratorExplore Day 004 of the 100 Days of Python challenge, a random password generator using lists, loops, and shuffling. 5 min read
- Lesson 21: 100 Days of Python: Day 005 Number Guessing GameExplore Day 005 of the 100 Days of Python challenge, a number guessing game using random values, while loops, and input validation. 5 min read
- Lesson 22: 100 Days of Python: Day 006 Age CalculatorExplore Day 006 of the 100 Days of Python challenge, an age calculator using datetime, while loops, parsing, and date arithmetic. 5 min read
- Lesson 23: 100 Days of Python: Day 007 Dragon Ball HangmanExplore Day 007 of the 100 Days of Python challenge, a Dragon Ball Hangman game using modules, loops, lists, and game-state tracking. 5 min read
- Lesson 24: 100 Days of Python: Day 008 Caesar CipherExplore Day 008 of the 100 Days of Python challenge, a Caesar Cipher encoder and decoder using functions, parameters, and modular arithmetic. 5 min read
- Lesson 25: 100 Days of Python: Day 009 Secret AuctionExplore Day 009 of the 100 Days of Python challenge, a secret auction program using dictionaries, loops, validation, and sorting. 6 min read
- Lesson 26: 100 Days of Python: Day 010 CalculatorExplore Day 010 of the 100 Days of Python challenge, a calculator that uses functions, dictionaries, validation, and chained operations. 6 min read
- Lesson 27: 100 Days of Python: Day 011 Blackjack GameExplore Day 011 of the 100 Days of Python challenge, a command-line Blackjack game with card scoring, dealer logic, and game statistics. 6 min read
Level 4: Build Real Things
Scrape websites, work with databases, build web applications, and run them in containers.
- Lesson 28: Web Scraping with Python: A Beginner's GuideLearn web scraping with Python, Requests, and Beautiful Soup: setup, finding data in HTML, saving to CSV, and scraping ethically. 7 min read
- Lesson 29: SQLAlchemy: A Complete Guide to Python Database ManagementLearn SQLAlchemy 2.0: connect, define models, run CRUD, use relationships and joins, avoid N+1 queries, manage transactions, and migrate with Alembic. 15 min read
- Lesson 30: Python Web Frameworks: Django vs Flask vs FastAPICompare the top Python web frameworks, Django, Flask, and FastAPI, with tested code for each, a decision table, and tips to pick the right one for your project. 10 min read
- Lesson 31: Python Flask: Build and Deploy Web Applications (Complete Guide)Learn Python Flask from scratch: routes, templates, forms, a database, a JSON API, tests, and deployment with Gunicorn, Nginx, or Docker. 15 min read
- Lesson 32: Docker for Beginners: Your First Steps into ContainersNew to containers? Learn Docker basics for beginners, then build a Flask and MySQL app with Docker Compose step by step. 7 min read
Where to go next
Python opens many paths. Once you know the basics, pick the one that matches what you want to build.
Data analysis
Use Python, pandas, and statistics to answer questions with data. Has its own free course.
Databases and SQL
Most programs store data in a database. Learn SQL with a free course and a practice database.
Web applications
Compare Django, Flask, and FastAPI, then build and deploy a Flask app.
Automation and scraping
Collect data from websites and automate repetitive work with a few lines of Python.
Who this course is for
Complete beginners
You have never programmed. The first lesson explains what Python is and the core ideas to learn first.
Spreadsheet and Excel users
You want to automate repetitive work and handle data that is too big or messy for a spreadsheet.
Aspiring developers and analysts
You need a solid base in Python before moving on to web development, data analysis, or automation.
Frequently asked questions
Is the course really free?
Yes. Every lesson is a free article on this site, with no signup or paywall.
Do I need any programming experience?
No. The first lessons assume no experience, and each lesson builds on the one before it.
What do I need to install?
Python and a code editor. The setup lessons in Level 2 cover VS Code, virtual environments, and uv, and you can follow the basics in a terminal or the Python shell.
How long does it take?
The lessons add up to many hours of reading and practice. Most people learn faster by typing the examples and doing the exercises, so plan a few weeks at a pace of one or two lessons a day.
Can I learn Python for data analysis?
Yes. Learn the basics here, then continue with the Learn Data Analysis course for pandas, statistics, and dashboards.
Ready to write your first program?
Start with Lesson 1. It explains what Python is and the core ideas every beginner should know.
Start Lesson 1Need help with a Python project?
If you would rather have someone build the script, automation, or data pipeline for you, I can help.
Book a Free Consultation