What Is Python?

A friendly first look at the language

Beginner 7 min

In this lesson

Python is a popular, beginner-friendly programming language used for everything from automating small tasks to building websites and analysing data. Before writing any code, it helps to know what Python is and why it’s such a common first language — by the end you’ll understand what programming means, where Python fits, and what you’ll be able to build.

Explain it like I’m 5

A computer only does exactly what it’s told, step by step. Python is a clear way to write those steps in something close to English — like writing a recipe a very literal robot can follow.

What programming actually is

Programming is writing precise instructions for a computer to carry out. The computer has no common sense: it does exactly what your instructions say, in order, very fast. A programming language like Python is the agreed-upon set of words and rules for writing those instructions so the computer can understand them.

Python is an interpreted language: a program called the interpreter reads your code line by line and runs it immediately. That’s why you can try a single line and see the result right away — there’s no slow ‘build’ step like some other languages have.

Example
print("Hello, world!")
Output
Hello, world!
A single instruction the interpreter runs.

Change the message between the quotes to your own words, then press Run.

print("Hello, world!")

Why Python is so popular

Python’s syntax (its grammar) was deliberately designed to be readable. Where other languages use lots of symbols and punctuation, Python often reads almost like plain English, so you spend more time thinking about the problem and less time fighting the language.

  • Beginner-friendly: short, clear code; helpful error messages.
  • Batteries included: a large standard library of ready-made tools ships with Python.
  • Huge ecosystem: hundreds of thousands of free add-on packages for almost any task.
  • General purpose: the same language is used for tiny scripts and large applications.

What people build with Python

Python is used for automation (scripts that do repetitive jobs), data analysis and machine learning, web applications (sites and APIs), scripting inside other software, and lots more. A script is a small program that does one job; an application is a larger, longer-lived program — but both are just Python files.

What Python is not the best tool for

No language is best at everything. Python is not the usual choice for very high-performance game engines, low-level operating-system code, or iPhone/Android apps. That’s fine — you’ll still be able to build an enormous range of useful, real things, and the fundamentals you learn here carry over to any language.

The Zen of Python: the language’s philosophy

Python isn’t just a set of rules — it has a philosophy. Type import this into Python and it prints the Zen of Python, a list of short guiding principles like ‘Readability counts’ and ‘Simple is better than complex’.

When people call code ‘Pythonic’, they mean it follows this spirit: clear, direct, and easy to read. You don’t need to memorise the Zen — but knowing Python values readability over cleverness explains a lot of the choices you’ll see as you learn. When you’re ready to set Python up on your own machine, head to Installing Python.

Example
import this
Output
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Readability counts.
...
A famous Easter egg built into Python. (Output abbreviated.)

Common mistake: Expecting the computer to ‘know what you mean’

Why it happens:

Computers have no intuition. If an instruction is slightly off, the computer won’t guess — it will either do the wrong thing exactly, or stop with an error.

How to fix it:

Be precise and check each step. When something goes wrong, read the error message; it’s the computer telling you exactly where it got confused.

Which sentence best describes Python?

Why is Python often recommended for beginners?

Mini exercise (easy)

Write a program that prints your name on one line and your favourite thing about computers on a second line.

Do it here. Finish the code below and press Run to try your answer right in the browser — no setup needed.

# Line 1: print your name
# Line 2: print your favourite thing about computers
print("Your name")
print("...")

What to learn next

You now know what programming really is: precise, literal instructions a computer follows in order. You saw why Python’s readable, English-like syntax makes it a forgiving first language, what people build with it, and where it isn’t the best fit. You even ran your very first instructions, printing your name and a thought about computers with print().

A natural next step is getting Python onto your own machine so you can write code outside this site. Installing Python covers checking whether you already have it, installing it cleanly on any system, and the single PATH checkbox that trips up most newcomers. When you’re ready, continue to the next lesson.