Python is a programming language known for code that reads almost like plain English. It is often the first language taught in Indian colleges and coding courses, and it is also used every day by professional developers, data analysts and scientists. In this Python introduction you will learn what Python is good at, install it on your own computer and run your first program from a file.
What is Python?
Python was created by Guido van Rossum and first released in 1991. Today it is developed in the open by the Python Software Foundation and a large community. It is free to download and use, and it runs on Windows, macOS and Linux.
Three things make Python friendly for beginners:
- Readable syntax. Blocks of code are marked by indentation instead of curly braces, so code has to be neatly laid out before it will run.
- An interpreter. You do not compile anything yourself. Python reads your file and runs it straight away, so you see results immediately.
- “Batteries included”. The standard library that comes with Python already handles files, dates, maths, JSON, CSV, web requests and much more.
What can you build with Python?
| Area | Typical use |
|---|---|
| Automation and scripts | Renaming hundreds of files, cleaning Excel or CSV data, sending reports |
| Web back ends | Websites and APIs with frameworks such as Django or Flask |
| Data analysis | Reading sales data, finding trends, drawing charts |
| Machine learning and AI | Training and using models with popular open-source libraries |
| Teaching and testing | Learning programming ideas, writing automated tests for other software |
For a web designer, Python is a useful second language after JavaScript. JavaScript runs in the browser; Python usually runs on your computer or on a server.
Installing Python
This Python introduction and the rest of the track use Python 3. In October 2026 the current release is Python 3.14, and every example here works in Python 3.12 or newer. Python 2 reached its end of life in 2020, so ignore any tutorial that writes print "hello" without brackets.
Windows
- Go to python.org/downloads and download the Python install manager. The same app is also available in the Microsoft Store. It is now the recommended way to install Python on Windows; the older full
.exeinstaller is deprecated and will not be made for Python 3.16 and later. - Run the downloaded file and follow the steps. If it offers to add its folder to your
PATH, accept, so the commands work in any terminal. - Open Terminal (or Command Prompt) and type
py install 3.14to install that version. You can also simply typepy: if no Python is installed yet, it fetches the latest version for you. - Check it with
py --version.py listshows every version you have installed.
macOS
- Download the macOS installer package (
.pkg) from python.org/downloads and double-click it. - Follow the installer. It creates a Python 3.14 folder in Applications containing IDLE, a simple editor that comes with Python.
- In that folder, double-click Install Certificates.command so that Python can make secure HTTPS connections.
- Open Terminal and check with
python3 --version. On a Mac, usepython3, notpython.
Linux
Most Linux distributions already include Python 3. Open a terminal and type python3 --version. If it is missing, install it with your package manager, for example sudo apt install python3 on Ubuntu or Debian and sudo dnf install python3 on Fedora. Do not remove the system Python: parts of Linux depend on it.
Watch out: On Windows, if typing python opens the Microsoft Store instead of Python, use py, or turn off the “App execution aliases” for Python in Windows Settings.
The interactive shell
Type py (Windows) or python3 (macOS and Linux) on its own and press Enter. You get the >>> prompt, also called the REPL (read, evaluate, print, loop). Type 7 * 6, press Enter, and Python answers 42 straight away. The shell is perfect for quick experiments, and recent versions add colours and easy editing of multi-line code. Type exit or press Ctrl+D (Ctrl+Z then Enter on Windows) to leave.
Your first Python file
Real programs live in files ending in .py. Use any plain-text code editor: IDLE comes with Python, and Visual Studio Code with its Python extension is a popular free choice. Create a folder such as python-practice, make a file named hello.py inside it and type:
print("Vanakkam! Welcome to Python.")
print("I am learning Python in Puducherry.")
print("Python is", 2026 - 1991, "years old.")Vanakkam! Welcome to Python. I am learning Python in Puducherry. Python is 35 years old.
print() is a built-in function that shows text on the screen. Text goes inside quotes; numbers and calculations do not. When you give print() several values separated by commas, it puts a space between them.
Running the file
- Open a terminal in the folder that holds
hello.py. In VS Code use Terminal → New Terminal; elsewhere usecdto move into the folder. - Windows: type
py hello.py. macOS and Linux: typepython3 hello.py. - Press Enter. The three lines shown above appear in the terminal.
In IDLE you can instead open the file and press F5. In VS Code, the Run button at the top right does the same job.
A slightly bigger program
Programs become useful when they remember values. The next file stores a name, a city and an age in variables and builds sentences with f-strings: strings with an f before the quotes, in which {…} is replaced by a value. You will study both properly in the next lessons.
name = "Priya"
city = "Coimbatore"
age = 21
print(f"Hello, {name} from {city}!")
print(f"Next year you will be {age + 1}.")Hello, Priya from Coimbatore! Next year you will be 22.
Tip: In this track every example shows its exact output under the code. You learn faster if you type the examples yourself instead of copying them, then change the values and run them again.
Where to go after this Python introduction
Next, learn the basic rules of the language in Python Syntax and Variables.
