Harvard University

CS50's Introduction to Programming with Python

Harvard's CS50P — ten weeks from functions to OOP, with auto-graded problem sets, a unit testing week and a self-designed final project.

FreeBeginner10+ hoursEnglishPython
Go to course

Opens on Harvard University — a direct link, no affiliate tracking.

Course overview

David Malan brought the CS50 production values to a straight Python course, and the result is the most polished free introduction to the language that exists. Ten weeks of material, week 0 through week 9, running from functions and variables through conditionals, loops, exceptions, libraries, unit tests, file I/O, regular expressions and object-oriented programming, closing on a week titled Et Cetera.

The structure is the CS50 formula: a lecture, then a problem set that makes you use exactly what the lecture covered, then a final project of your own design. There's a public gallery of what previous students built. It's self-paced and open to anyone with a browser, Harvard student or not.

What separates it from other Python courses

Problem sets, and the fact that they're graded by an automated checker rather than by your own optimism. The gap between watching a Python video and writing Python is where most beginners live, and CS50P closes it by refusing to let you move on until the tests pass.

The unit testing week is also unusual for a beginner course and it's one of the most valuable in the set. Most people learn Python for a year before anyone mentions pytest to them.

The certificate question, answered properly

This is where the listing needs a footnote. Taking CS50P through the OpenCourseWare site — which is what this URL points at — is completely free and gives you every lecture, every problem set and the final project. It does not give you a certificate.

For a credential you enrol through edX and pay for a verified certificate, or go through one of the CS50 professional certificate programs in Python or data science. So: free course, paid paper. Anyone here for the Harvard name on a PDF should know that before starting.

Who it's for — and who should skip it

Excellent as a first programming course full stop, not just a first Python course, because Malan teaches the reasoning rather than the syntax. Also excellent if you've tried to learn Python twice and drifted — the problem sets create the accountability that a book cannot.

Skip it if you already program and just want Python's specifics; the pacing will frustrate you and the official tutorial will be faster. Skip it too if your goal is data science, since pandas, numpy and notebooks are outside the scope here.

Our take

The strongest free Python course available, with production quality nothing else matches. Two honest caveats: the certificate costs money despite the course being free, and the problem sets are genuinely hard — CS50 has a reputation for difficulty and CS50P inherits enough of it that a self-declared beginner course will still make you sit and think for an evening.

At a glance

Price
Free
Level
Beginner
Time to complete
10+ hours
Language
English
Certificate
Not offered
Taught by
Harvard University
Category
Python
Last checked
26 Aug 2026

Topics covered

  • python
  • harvard
  • cs50

More like this

Other courses covering the same subjects.

Ilya Kantor

Free

The Modern JavaScript Tutorial

Ilya Kantor's long-maintained JavaScript textbook: language internals, the DOM, async and browser APIs, with exercises and worked solutions…

Beginner10+ hrs
View →

Marijn Haverbeke

Free

Eloquent JavaScript (Free Book)

Marijn Haverbeke's fourth edition, free online — language fundamentals, the browser and Node, with projects including writing your own…

Intermediate10+ hrs
View →

Akshay Saini

Free

Namaste JavaScript

Akshay Saini's deep look at JavaScript internals — execution context, hoisting, scope chains, closures and the event loop, drawn out on a…

Intermediate4–10 hrs
View →

Microsoft

Free

The TypeScript Handbook

Microsoft's official TypeScript guide — basics, narrowing, generics, conditional and mapped types. Explicitly not a tooling or JavaScript…

Beginner2–4 hrs
View →

Reviews

No reviews yet

Took this course? Share what you thought.