We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Learn to Code in Python

Start coding in Python with hands-on lessons that build the habits you'll use in every future course.

What will you learn?

Learn the basics of the Python programming language, and why it's one of the most popular programming languages out there. You'll get hands-on practice with all the core concepts, and learn how to apply them to real-world problems. You don't need any prior programming experience to be able to complete this course, it's intended for complete beginners.

Chapter List

1
Introduction
Learn about the Python programming language and why it's so ubiquitous
2
Variables
Learn how variables are declared and used in Python
3
Functions
Learn how to declare and call functions
4
Scope
Learn how Python scopes variables in different contexts
5
Testing and Debugging
Learn how unit tests and good debugging practices will help you write better code
6
Computing
Learn the basics of how computers work internally
7
Comparisons
Learn how to compare different values and make logical decisions in a program
8
Loops
Master the art of reusing code
9
Lists
Learn the most basic and powerful data structure in all of coding
10
Dictionaries
Learn about Python's built-in support for complex structures
11
Sets
Master another basic data structure of the Python language
12
Errors
Learn how to deal with unexpected data and inputs in a Python program
13
Type Hints
Learn how to use type hints to make Python code easier to read and debug
14
Practice
Put your skills to work by squashing extra challenging practice problems
15
Quiz
Quiz yourself on some of the important-to-know facts about the Python language

Join 787,956 students in the Learn to Code in Python course

Read reviews of their learning experiences

Very good and amusing!!!

(5/5)
Nelson Avilés profile image

Nelson Avilés

Chile

Nice, easy, and very to the point.

(5/5)
Marco B profile image

Marco B

Switzerland

some exercise instructions like in the dictionaries and lists were a bit obscure and i had to look up additional notes, more info would be appreciated

(4/5)
Jess Goldenberg profile image

Jess Goldenberg

Australia

Pretty good, did some python in the past... but learn a few things. Thanks!

(5/5)
Alex  profile image

Alex

Puerto Rico

good but pretty basic

(4/5)
Nicholas Kwasnik profile image

Nicholas Kwasnik

United States

easy to understand and well paced. as someone who learned pascal in high school, this was breeze for me most of time, but definitely new codes friendly too

(5/5)
Jozef Bucany profile image

Jozef Bucany

Slovakia

If you are thinking about trying to learn to code this is the best site that I have found. It makes it fun and entertaining to learn. I am in my late 40's and I have found that, after a little adjustment, I was able to understand what they are asking me to solve. It's great. I am really impressed with what I have learned!!

(5/5)
Justin Pegg profile image

Justin Pegg

United States

I wanted to get a chance to refresh what I learned in school, and touch base on the basic concepts as well. I feel like this course did that.

(5/5)
Sir Oputa profile image

Sir Oputa

United States

I work professionally as a TypeScript programmer and wanted to learn so that I can pivot more towards backend stuff. This program is able to be accomplished in just a few days as a professional dev, and I did not feel like my intelligence was insulted (not once!) - It hands you the ability to shoot your own foot or be as defensive in your programming as you want and encourages testing (mind-blowing that the author thought to include it in a intro course. WELL DONE!)

(5/5)
Logan Johnson profile image

Logan Johnson

Owensboro, United States

Showing 1-9 of 4829

or view more reviews

Mediocrity doesn't cut it anymore

The only way to become a great developer is to write a lot of code

Avoid tutorial hell

by writing a ton of code

Stay motivated with

a game-like curriculum

Build portfolio projects

to prove your skills

Delve deeper

into foundational concepts

Learn flexibly online

without interrupting your life

For 1% the price of college

to minimize your financial risk

Frequently asked Questions

Got questions? We've got answers

Yes! It's free to create an account and start learning. You'll get all the immersive and interactive features for free for a few chapters. After that, if you still haven't paid for a membership, you'll be in read-only (content only) mode.