What Is Python?
A friendly first look at the language
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.
print("Hello, world!")
Hello, world!
Change the message between the quotes to your own words, then press Run.
print("Hello, world!")
Keep your text inside the quotation marks. Only the words between the quotes will change.
print("Python is going to be fun.")
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.
import this
The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Readability counts. ...
Common mistake: Expecting the computer to ‘know what you mean’
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.
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?
Python is a programming language — the words and rules you use to tell a computer what to do.
Why is Python often recommended for beginners?
Python’s clean syntax and helpful tooling make it approachable, while still being powerful enough for real work.
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("...")
Use two separate print() calls — each one prints on its own line.
print("Ada Lovelace")
print("It never gets bored repeating a task.")
Ada Lovelace
It never gets bored repeating a task.