BlogHello, Python — explained in plain language
2026-05-13 · By Kelvin Amoaba

Hello, Python — explained in plain language

What's actually going on with print, comments, variables, and data types. The bits beginners get told but rarely shown the why for.

The first time I sat in front of a Python cell, a friend was leaning over my shoulder telling me what to type. I typed it. It worked. And then I stared at the screen with a small, embarrassing question I didn't want to ask out loud: what just happened?

The lesson moves fast through the syntax. This post is the slower version — the why behind each piece. If the lesson is the recipe, this is me standing next to you in the kitchen, explaining why the salt goes in at that step and not earlier.

What print() is actually doing

Think of print() as the program's chalkboard. The computer doesn't understand the words you hand it. It just writes them on the board so you have proof the program got to that line. Anything you want the program to tell you — a result, a message, the value of a variable you're checking — goes on the chalkboard with print(). Without it, the program would do all its work in silence and you'd have no idea whether it ran at all.

That's most of what you need on day one. The interesting stuff is everything else.

What a comment really is

The first time I saw # at the start of a line, I assumed it was some kind of instruction. It isn't. A comment is the opposite of an instruction. It's a line the computer is told to ignore.

Think of a handwritten recipe card with "double the salt — modern salt is weaker" scribbled in the margin. The note is for the human reading the card. The recipe itself doesn't change. A robot following only the printed steps would skip the margin entirely. That's a comment. A note in the margin of your code that Python steps over. It exists for the person reading the file next — almost always you, three weeks from now, trying to remember what you were thinking.

A comment that earns its place tells you something the code can't:

# We multiply by 1.15 because the scholarship adds a 15% visa buffer.
total_budget = base_cost * 1.15

A comment that wastes everyone's time just narrates the code:

# Multiply base cost by 1.15
total_budget = base_cost * 1.15

The second one tells you nothing new. You can already see the multiplication. Use comments to explain the reason behind a line, not to translate the line into English.

Why variables exist at all

Without variables, every line of your program would forget everything the previous line knew. You could print "Hello, Amara" but on the next line the program wouldn't remember who Amara was.

A variable is how the program remembers. Picture a row of labelled jars on a kitchen shelf. You put something in a jar, you stick a label on the front, and later you reach for the jar by name.

name = "Amara"
target_country = "Germany"

Two jars. One labelled name with "Amara" inside. Another labelled target_country with "Germany" inside. From now on, anywhere in the program, you can write name and Python will look at that jar and pull out what's there.

One thing to notice — the = sign isn't doing what it does in maths. In maths, = means "is equal to." In Python, on a line like this, = means "put this on the right into the jar on the left." It points in one direction. Small thing, but it tripped me up for weeks.

Why different data types exist

You don't store water in a wallet. You don't store coins in a bucket. The container has to match what you're keeping in it.

Code is the same. Python keeps different kinds of values in different kinds of containers because the things you can do with each kind are different. You can add two numbers. You can't meaningfully add two yes-or-no answers — what would that even mean? So Python labels each value with a type, and that label tells the program what's allowed.

Four types come up in your first week:

  • A string (str) is text. Names, sentences, anything you'd write in quotes. Answers "what does this say?"
  • An integer (int) is a whole number. Years, counts, ages. Answers "how many?"
  • A float is a number with a decimal point. GPAs, prices, percentages. Answers "how much, with precision?"
  • A boolean (bool) is a yes-or-no — True or False. Answers "is this so?"

You don't memorise these. You meet them often enough that they become familiar, the same way you learned to tell a teaspoon from a tablespoon.

Why "5" and 5 are not the same thing

This is the single biggest source of confusion in the first week.

When you type "5" with quotes, you're giving Python a piece of text that happens to look like a number. When you type 5 without quotes, you're giving it an actual number. They look almost identical on screen. They behave nothing alike.

"5" + 3 makes Python complain, because you're asking it to glue a label to a coin. Did you mean the text "53"? The number 8? Python refuses to guess.

This matters because input() always hands you back a string, even if the user typed digits. So the moment you ask someone their age and try to do maths with the answer, you crash:

age = input("Your age? ")
print(age + 10)   # crash

The fix is to convert. int(age) says "treat this label as a real number." After that, the maths works. Almost every "why isn't my program working" question in the first two weeks comes back to this one mismatch. Once you've been bitten twice, you start converting by reflex.

One last thing

You don't need to understand all of this on the first day. Type the code. Run it. Get something on the screen. The understanding comes from doing it a few times and noticing the patterns. If you finish this week able to print things, store things in variables, and convert a string to a number without panicking, you're exactly where you should be.