Skip to main content
Python is a high-level, interpreted programming language designed with one goal in mind: making it as easy as possible for humans to write instructions that computers can execute. Rather than wrestling with low-level memory management or verbose syntax, you focus on expressing your ideas clearly — Python handles the rest. That philosophy has made it the dominant language for data science, machine learning, and AI, and it is exactly what you will use throughout this course to build intelligent APIs with FastAPI.

What is programming?

Programming is writing step-by-step instructions for a computer to follow. Computers are powerful, but they are not smart — they need precise, unambiguous directions for everything. A programming language is the bridge between human thinking and machine execution:
  1. You write code in Python — syntax that looks close to plain English.
  2. Python translates your code into lower-level instructions the runtime understands.
  3. The computer executes those instructions and produces a result.

How Python’s interpreter works

Unlike compiled languages (such as C or Go), Python is interpreted. When you run a Python file, the Python interpreter reads your source code line by line, translates each line into bytecode, and executes it immediately. You do not need a separate compile step before running your program.
This makes iteration fast: change your code, run it again, and see the result instantly. It is one reason Python is so popular for exploratory data work and AI prototyping.

Dynamic typing

Python uses dynamic typing, which means you do not declare the type of a variable before using it. Python figures out the type at runtime based on the value you assign.
Even though Python doesn’t require type annotations, modern Python supports optional type hints. FastAPI relies heavily on them — you’ll learn to use them throughout this course.

What Python code looks like

Here is a taste of Python syntax. Notice how readable it is compared to many other languages:
Indentation (the spaces at the start of each line) is not just style in Python — it is how the language defines code blocks. You will get used to it quickly.

Why Python is great for AI

Python’s position as the leading AI language is not an accident. Several factors combine to make it the right tool for the job:
  • Readable syntax — Data scientists and researchers can focus on algorithms, not boilerplate code.
  • Rich ecosystem — Libraries like NumPy, Pandas, TensorFlow, PyTorch, and scikit-learn are all Python-first.
  • Interactive exploration — Jupyter notebooks let you mix code, output, and documentation in one place.
  • FastAPI — The modern web framework you’ll use in this course is Python-native and built for building AI-powered APIs.
  • Massive community — Millions of developers means abundant tutorials, Stack Overflow answers, and open-source packages.

Python versions

There are two major Python version lines you may encounter:
  • Python 3 (current) — This is what you will install and use. All course material targets Python 3. See the official version support schedule for details.
  • Python 2 (end-of-life) — Support ended in January 2020. If you come across a tutorial using Python 2, find a newer one.
Always install Python 3. If a tutorial or code sample uses print "hello" without parentheses, it is Python 2 and out of date.

Ready to install?

Continue to Installing Python

Choose your operating system and get Python running on your machine.