
Python Variables and Data Types
A Python variable is not a box you fill. It is a name bound to an object, and the object carries the type. Get that straight early and a whole class of…
Read tutorialBuild your Python foundation with variables, data types, strings, numbers, input, output, and everyday operations.
Tutorials
Follow these lessons in order, or jump directly to the topic you need.

A Python variable is not a box you fill. It is a name bound to an object, and the object carries the type. Get that straight early and a whole class of…
Read tutorial
Every value in Python carries a type, and every type has rules about what you can do with it. Numbers compute. Strings reshape. The moment you learn to…
Read tutorial
A program that never asks a question can only ever do the same thing. The moment you add input(), your script stops being a fixed script and becomes a tool…
Read tutorial
Comments are not for Python. They are for the next human who reads your code—and that human is often you, six weeks later. The interpreter skips every line…
Read tutorial
Python does not make you memorize a calculator manual. It hands you a small set of operators and lets you run the calculation and read the answer…
Read tutorial
Reading about variables and input() is useful. Running them is where the skill actually lands. These python basics exercises are built around one idea:…
Read tutorial
Every value in Python carries a type, and Python is strict about it. A string "30" and an integer 30 look alike on screen, but they behave completely…
Read tutorial
You already know how to print a value. The harder part is making that output read like a sentence instead of a pile of labels. Python string formatting is…
Read tutorial
Good names are the cheapest debugging tool you own. A variable called a tells you nothing when a script breaks; a variable called average_score tells you…
Read tutorial
An operator is how you tell Python to act on a value: add it, compare it, store it, or test whether it belongs somewhere. Most beginner bugs are not syntax…
Read tutorial
You have a messy string. Maybe it has extra spaces at the edges, mixed capitalization, a word you need to swap out, or text you want to break into pieces.…
Read tutorial