Basics · Lesson 20 of 76
Python syntax
Syntax is the set of rules for how Python code must be written. Two rules matter most early on:
- One instruction per line (usually).
- Indentation has meaning. The spaces at the start of a line tell Python what belongs together — it's not just for looks.
Python
Python is also case-sensitive: Name and name are two different things. Get a rule wrong and Python stops with an error message — which is normal, and the next lesson shows how to read them.
Your turn: remove the spaces before the first print and run it — see the error, then put them back.
You’re reading for free. Sign in to keep your progress and earn a certificate when you finish.Sign in to keep my progress →