Learn / Beginner / Lesson 1

What is Python?

7 min Tested on Python 3.15Updated By
In short

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

AreaWhat people buildPopular tools
AI and machine learningModels, chatbots, RAG systemsPyTorch, scikit-learn, LLM SDKs
DataAnalysis, dashboards, pipelinespandas, Polars, Airflow
Web and APIsBack ends and servicesFastAPI, Django, Flask
AutomationScripts that save hours of manual workStandard library, requests
Science and financeSimulations, models, researchNumPy, 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.

Python
print("Hello from Python!")
print(2 + 3)
Output
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.

terminal
python --version
# Python 3.15.0

Python 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.

Expected output:
I am learning Python
42
Your code

Quick check

1. Why is Python so popular for AI?

2. Should you learn Python 2 today?

3. What does print(2 + 3) show?

Use AI at work

Python is the base of AI. On AIMates you learn to use AI tools well in your daily job.

Visit AIMates →