What is Python?
10 min · Beginner
Need help? Ask a tutor on WhatsApp (opens in a new tab)Python is a programming language: a way to write instructions that a computer can follow. People use it to build web APIs, automate daily tasks, analyze data and create AI applications.
What is a programming language?
A programming language is a set of words and rules used to write instructions that a computer can follow.
A computer only follows exact instructions. A programming language is a set of words and rules for writing them, and the instructions are called code.
print("Hello, World!")This single line tells the computer to display Hello, World! on the screen. Python was released in 1991 by Guido van Rossum. Its clean syntax reads like plain English, making it an ideal first programming language.
Where is Python used?
Python powers systems and tools you use every day across modern software companies.
- Web backends – FastAPI, Django and Flask power high-speed web services and APIs.
- Artificial Intelligence & Data – Python is the leading language for machine learning, data science and AI models.
- Automation & scripting – developers use Python to automate repetitive file, system and data tasks.
- Campus placements – tech companies frequently allow and test Python in technical coding rounds.
How does Python run?
An interpreter is a program that reads your code and runs it. Python turns your code into bytecode, then runs that bytecode.
Your Python code is saved in a text file with a .py extension. Python uses an interpreter to read and execute your program.
- You write your code in a file:
hello.py - The interpreter translates your code into bytecode instructions
- The Python Virtual Machine (PVM) executes the bytecode on your computer
Because Python interpreters exist for Windows, macOS and Linux, the same .py code runs across different operating systems.
Example
print("Hello, World!")print("Welcome to Python.")Hello, World! Welcome to Python.
What this code does
- A preview of a small Python program.
print()is a built-in Python function that displays text on the screen.- Text inside quotes is called a string. Each
print()outputs on a new line.
Next step
Check your understanding
5 quick questions