Beginner 18 lessons

Python Programming for Beginners

Learn Python from zero. Understand how to write real programs, work with data, build useful tools, and think like a programmer. No experience needed.

Lessons

Work through these in order for the best experience.

01
What is Python and Why Learn It?
Understand what Python is, why it is one of the most popular languages in the world, and what you can build with it.
~20 min
02
Setting Up Python on Your Computer
Install Python and a code editor on Windows, Mac, or Linux so you are ready to write and run your first programs.
~17 min
03
Variables and Data Types
Learn how to store information in variables and understand the different types of data Python works with.
~21 min
04
Comments in Python
Learn what comments are, how to write them, and why writing good comments makes you a better programmer.
~19 min
05
Numbers and Math Operations
Learn how to do calculations in Python, work with different types of numbers, and understand operator precedence.
~21 min
06
Working with Strings
Learn how to create, combine, format, and manipulate text in Python.
~23 min
07
Getting Input from the User
Learn how to ask the user for information, read what they type, and use it in your program.
~19 min
08
Making Decisions with If Statements
Learn how to make your programs act differently based on different conditions using if, elif, and else.
~22 min
09
Loops: Repeating Actions
Learn how to use for loops and while loops to repeat code automatically instead of writing it out over and over.
~26 min
10
Lists
Learn how to store multiple values in a single variable using lists, and how to add, remove, and access items.
~22 min
11
Dictionaries
Learn how to store data as key-value pairs using dictionaries, one of the most useful data structures in Python.
~19 min
12
Functions
Learn how to write reusable blocks of code called functions to organize your programs and avoid repeating yourself.
~21 min
13
Working with Files
Learn how to read data from files and write data to files so your programs can store information permanently.
~18 min
14
Error Handling
Learn how to handle errors and exceptions gracefully so your programs do not crash unexpectedly.
~23 min
15
Modules and Imports
Learn how to use Python's built-in modules and install external packages to extend what your programs can do.
~21 min
16
Object-Oriented Programming Basics
Learn the fundamentals of object-oriented programming: classes, objects, attributes, and methods.
~19 min
17
Project: Command-Line Calculator
Put your skills together to build a fully working command-line calculator with a menu, multiple operations, and history.
~21 min
18
What to Learn Next
You finished the basics. Now find out what to study next based on what you want to build with Python.
~20 min