Skip to content

B. What is Python?

Let's take a closer look at the main properties that define Python and consider how these characteristics position it within the broader landscape of programming languages. Python is most commonly described as a high-level, general-purpose, and interpreted programming language, though it also carries other notable traits, such as being dynamically typed and supporting multiple programming paradigms, including procedural, object-oriented, and functional styles. Taken together, these features make Python remarkably approachable for beginners, thanks to its clean, readable syntax and forgiving learning curve, while still being robust and capable enough to support professional, production-grade applications. This combination of accessibility and power is a large part of why Python has become a go-to language across such a wide range of fields, including data analysis, finance, artificial intelligence and machine learning, automation and scripting, web development, and scientific computing.

Watch video: What is Python? Overview

General-Purpose: Python is considered general-purpose because its capabilities extend far beyond any single specialized task, making it adaptable to an enormous variety of problems and industries. It has found a home in data analysis, where it's used to clean, process, and visualize large datasets; in finance, for tasks like quantitative modeling and risk assessment; in machine learning and artificial intelligence, where its rich ecosystem of libraries has made it something of an industry standard; in web development, powering both backend logic and full applications; in automation, streamlining repetitive tasks and workflows; and in academic research, where its clarity and flexibility make it a popular tool across disciplines ranging from physics to the social sciences. This breadth of use is part of what sets a general-purpose language apart from more narrowly focused, domain-specific ones.

High-Level: Python qualifies as a high-level language because it abstracts away the vast majority of the technical, low-level details involved in how a computer actually operates, things like memory management, register handling, and direct hardware instructions. Rather than needing to be concerned with these mechanics, users can devote their attention to solving the problem at hand and writing instructions that are clear, logical, and readable. This abstraction not only makes Python considerably easier to learn and use than lower-level languages, but it also means code tends to be more concise, since a single line of Python can often accomplish what might take many lines in a lower-level language such as C or assembly.

Interpreted: Python is usually described as an interpreted language because its code is executed directly by an interpreter, rather than needing to be compiled into a standalone executable beforehand. This means users can write a line or block of code and see the results almost immediately, without waiting through a separate compilation step. That immediacy is especially valuable when learning to program, testing new ideas, or debugging, since mistakes can be caught and fixed quickly rather than after a lengthy build process. It's also what makes Python so well suited to interactive environments such as Jupyter Notebooks, the Python shell, or other REPL (read-eval-print loop) tools, where code can be run piece by piece, results inspected on the fly, and experiments adjusted in real time.

Dynamically Typed: Python is dynamically typed, meaning that a variable's type, such as whether it holds a number, a piece of text, or a list, is determined automatically at the moment a value is assigned, rather than needing to be explicitly declared by the programmer beforehand. For example, writing x = 5 and later x = "hello" is perfectly valid in Python, since the type of x simply updates to match whatever value it currently holds. This stands in contrast to statically typed languages such as Java or C, where a variable's type must be fixed in advance and cannot change afterward. Dynamic typing is a significant part of what gives Python its flexibility and speeds up the process of writing and testing code, since programmers don't need to spend time declaring types upfront, though it does mean that certain type-related errors may only surface when the program is actually run, rather than being caught earlier during compilation.

Multi-Paradigm: Python is also considered a multi-paradigm language, meaning it doesn't restrict programmers to a single way of structuring and organising their code, but instead supports several different programming styles, or paradigms, and even allows them to be mixed within the same project. It supports procedural programming, where code is organised as a sequence of step-by-step instructions and reusable functions;

Object-oriented programming, where data and behaviour are bundled together into objects and classes, useful for modelling more complex, real-world systems; and functional programming, where computation is treated more like the evaluation of mathematical functions, often favouring immutable data and self-contained functions with no side effects. This flexibility means a beginner can start out writing simple, procedural scripts, while more advanced users can gradually adopt object-oriented or functional techniques as their projects grow in size and complexity, all without needing to switch to a different language.