What is Python?
Python is a free, general-purpose programming language known for readable code that looks close to plain English. It runs everywhere — from scripts on your laptop to web apps and the AI systems behind ChatGPT-style tools — which makes it the most widely taught first language today.
Why Python?
- Readable: indentation shows structure, so code is easy to follow.
- Batteries included: a large standard library for files, dates, the web, maths and more.
- Huge ecosystem: hundreds of thousands of packages on PyPI — pandas, FastAPI, PyTorch and many others.
- The language of AI: most machine learning and LLM tooling is written for Python first.
- Free and open source, on Windows, macOS, Linux and even in your browser.
Where Python is used
| Area | What people build | Popular tools |
|---|---|---|
| AI and machine learning | Models, chatbots, RAG systems | PyTorch, scikit-learn, LLM SDKs |
| Data | Analysis, dashboards, pipelines | pandas, Polars, Airflow |
| Web and APIs | Back ends and services | FastAPI, Django, Flask |
| Automation | Scripts that save hours of manual work | Standard library, requests |
| Science and finance | Simulations, models, research | NumPy, SciPy |
Try it right now
You don't need to install anything to start. Press Run on the code below — Python runs inside your browser.
print("Hello from Python!")
print(2 + 3)Hello from Python! 5
Installing Python on your computer
When you want to build projects on your own machine, install the latest Python from python.org (Windows and macOS installers), or with your system's package manager on Linux. Many developers now use uv, a fast tool that installs Python versions and manages project dependencies in one place.
python --version
# Python 3.15.0Python versions
A new Python version comes out every October. These lessons are tested on Python 3.15. Anything from Python 3.10 onwards will run almost all examples; older versions such as Python 2 are no longer supported and shouldn't be used for new code.
Practice
Make Python print exactly two lines: I am learning Python and then the result of 7 * 6.
I am learning Python 42