Python from zero4 min
Hello, Python
print, comments, and the one rule that trips up every JS dev.
Your first line
In TypeScript you'd write console.log("hi"). In Python it's just print:
- No
console.prefix —printis a built-in. - No semicolons. Ever. Line breaks end statements.
- Comments use
#, not//.
Hit Run (or Cmd/Ctrl+Enter). First run downloads the Python engine into your browser — a one-time ~10 MB. After that it's instant.
python
💡 Change the text, add another print, re-run.
The one rule: indentation IS the syntax
TypeScript uses { } to group code. Python uses indentation — 4 spaces. There are no braces. A colon : opens a block, and the indented lines below belong to it.
This isn't a style guide you can ignore — wrong indentation is a syntax error.
python
💡 Delete the 4 spaces before the second print and re-run to see the error.