Bring five readers who confirm their email and you get a month of the paper, free.

The paper is A$5 a month from day one. The Daily is free forever.

You, me, and print

Python · Lesson 1

You, me, and print

What Python is, and the first line that talks back.

Lessons · Python · Lesson 1 of 10 · On the house

You, me, and print

What Python is, and the first line that talks back.

A newspaper still of a Python lesson
Lesson 1 is on the house. The rest of the course opens with the paper, the Daily, or a gift.

Here's the short version. Python is a language people write when they want the computer to do a job without dressing it up. It was named after Monty Python, not the snake. You'll see that humour in the manuals if you go looking. We won't. We'll write.

You don't compile it the way you compile C++. You write a line. An interpreter reads the line. It does the work. That's enough for today.

The first verb is print. It puts words on the screen. Quotes around the words, because they're a string of characters, not a name of something else. Parentheses because print is a function — a little machine you call.

The still

print("hello")
A one-line program. That's a whole program in Python.

Type it yourself in the window below. Don't copy-paste if you can help it. The point is your fingers finding the quotes.

Quiz

What does print do?

Check

Type a print that says hello. Quotes and parentheses. Match the still.

That's the door. Next time we give things names, and we do arithmetic that doesn't shrug.

You, me, and print · Python — The Gold Standard