Editor

pythoncompiler.io

ThePythonBook

Interactive Python tutorials, from your first program to data science, with exercises that check your code.

Variables, data types, strings, operators, and your first programs

1

Python for Beginners: Your First Program in 5 Minutes

Beginner20 min4 exercises+60 XPUpdated Oct 2026
2

Python Variables and Data Types: A Practical Introduction

Beginner25 min7 exercises+125 XPUpdated Oct 2026
3

Python Numbers: Integers, Floats, and Math You'll Actually Use

Beginner20 min6 exercises+110 XPUpdated Oct 2026
4

Python Strings: Create, Access, Slice, and Manipulate Text

Beginner25 min8 exercises+165 XPUpdated Oct 2026
5

Every Python String Method Explained with Examples

Beginner25 min7 exercises+130 XPUpdated Oct 2026
6

Python String Formatting: f-strings, format(), and % Operator

Beginner20 min5 exercises+75 XPUpdated Oct 2026
7

Python Booleans, Comparisons, and Logical Operators Explained

Beginner25 min6 exercises+90 XPUpdated Oct 2026
8

Python Input and Output: print(), input(), and Formatting

Beginner15 min4 exercises+90 XPUpdated Oct 2026
9

Python Type Conversion: How to Convert Between Data Types

Beginner20 min5 exercises+85 XPUpdated Oct 2026
10

Writing Clean Python: Comments, Docstrings, and PEP 8

Beginner15 min4 exercises+90 XPUpdated Oct 2026

Take the Section Quiz

Test your Python Fundamentals skills · 15 min · +200 XP