Safekipedia

Python (programming language)

Adapted from Wikipedia · Adventurer experience

Python Logo

Python is a high-level, general-purpose programming language that makes writing code easy and fun. It focuses on code readability by using clear names and indentation, much like writing in plain English. Python includes a large standard library and helps programmers manage their code better.

Guido van Rossum began creating Python in the late 1980s to replace the ABC programming language. Python 3.0, released in 2008, was a big update that did not work with older versions. Starting with Python 3.5, the language added features for optional static typing. The Python Software Foundation supports several versions of Python, releasing updates each year. Python 3.15 is being developed and will come out in October 2026.

Python is very popular in the machine learning community and is often used to teach new programmers. Since 2003, Python has been one of the top ten most popular programming languages.

History

Main article: History of Python

Python started in the late 1980s when Guido van Rossum worked at Centrum Wiskunde & Informatica in the Netherlands. He made it to improve the ABC programming language. The first version, Python 0.9.0, came out in 1991.

The designer of Python, Guido van Rossum, at PyCon US 2024

The name Python comes from a British comedy series called Monty Python's Flying Circus.

Python changed a lot over the years. Python 2.0 came out in 2000 with new features, and Python 3.0 was released in 2008. As of January 2026, Python 3.14.5 is the latest version.

Design philosophy and features

Python is a language that can work in many different ways. It supports common styles of programming, like organizing code into objects. Python is often called a “glue language” because it helps connect pieces of code written in other languages.

Python’s design focuses on making code easy to read and simple. It tries to have one clear way to do things. Python’s creators choose readability over speed, meaning they prefer code that is easy to understand even if it is not the fastest. The name Python comes from the comedy group Monty Python, and the language often uses playful examples in its lessons.

Syntax and semantics

Main article: Python syntax and semantics

Python is made to be easy to read. It uses simple words instead of symbols and avoids tricky punctuation. Unlike some languages, Python does not use curly brackets to show groups of code. This keeps the code looking neat and clear.

Python uses spaces to show where groups of code start and end. This means the way the code looks on the page matches how it works. For example, after a certain word, you add spaces to start a new group, and when you stop adding spaces, that group ends. This helps make Python code easy to understand.

Python has special words for doing things like checking conditions, repeating actions, and handling mistakes. For example, you can use if to check a condition, for to repeat something a certain number of times, and try to try something while handling any mistakes that might happen. These tools help programmers write clear and useful code.

Summary of Python 3's built-in types
TypeMutabilityDescriptionSyntax examples
boolimmutableBoolean valueTrue
False
bytearraymutableSequence of bytesbytearray(b'Some ASCII')
bytearray(b"Some ASCII")
bytearray([119, 105, 107, 105])
bytesimmutableSequence of bytesb'Some ASCII'
b"Some ASCII"
bytes([119, 105, 107, 105])
compleximmutableComplex number with real and imaginary parts3+2.7j
3 + 2.7j
5j
dictmutableAssociative array (or dictionary) of key and value pairs; can contain mixed types (keys and values); keys must be a hashable type{'key1': 1.0, 3: False}
{}
types.EllipsisTypeimmutableAn ellipsis placeholder to be used as an index in NumPy arrays...
Ellipsis
floatimmutableDouble-precision floating-point number. The precision is machine-dependent, but in practice it is generally implemented as a 64-bit IEEE 754 number with 53 bits of precision.
1.33333
frozensetimmutableUnordered set, contains no duplicates; can contain mixed types, if hashablefrozenset({4.0, 'string', True})
frozenset()
intimmutableInteger of unlimited magnitude42
listmutableList, can contain mixed types[4.0, 'string', True]
[]
types.NoneTypeimmutableAn object representing the absence of a value, often called null in other languagesNone
types.NotImplementedTypeimmutableA placeholder that can be returned from overloaded operators to indicate unsupported operand types.NotImplemented
rangeimmutableAn immutable sequence of numbers, commonly used for iterating a specific number of times in for loopsrange(−1, 10)
range(10, −5, −2)
setmutableUnordered set, contains no duplicates; can contain mixed types, if hashable{4.0, 'string', True}
set()
strimmutableA character string: sequence of Unicode codepoints'Wikipedia'
"Wikipedia"
"""Spanning multiple lines"""
tupleimmutableTuple, can contain mixed types(4.0, 'string', True)
('single element',)
()

Development environments

See also: Comparison of integrated development environments § Python

Python has tools to help you write and test your code. One tool is called a REPL. It lets you type code and see the results quickly. Python also includes a simple tool called IDLE that is easy for beginners.

There are many other tools to help with writing Python code. Some work on your computer, like PyCharm, Spyder, and Visual Studio Code. Others work in a web browser, like Jupyter Notebooks and PythonAnywhere. These tools can make writing code easier and more fun.

Implementations

See also: List of Python software § Python implementations

Reference implementation

CPython is the main version of Python that most people use. It is written in the C language. CPython changes Python code into a special form called bytecode, which a virtual machine runs. It comes with many tools.

CPython works on many operating systems, like Windows and most Unix-like systems, including macOS. Python was designed to work across different platforms from the beginning.

Other implementations

There are other versions of Python that work a little differently. For example, some can make Python run faster or work better on small computers.

  • PyPy is a faster version of Python. It can make programs run quicker but does not work with all Python tools.
  • Codon compiles Python to machine code, making it run much faster.
  • MicroPython and CircuitPython are made to run Python on small devices.
  • Pyston uses special techniques to speed up Python programs.
  • Cinder is a version of Python designed for speed.
  • Snek is a Python-like language for small computers, but it is not fully compatible with Python.
  • RustPython is written in the Rust language and aims to work like CPython.

Unsupported implementations

Some older or special versions of Python are no longer supported:

  • Stackless Python changes how Python handles many small tasks at once.
  • Google worked on Unladen Swallow, aiming to make Python faster, but this project is no longer active.
  • Psyco was a tool to make Python run faster but only worked with older versions of Python.
  • PyS60 was a version of Python for old Nokia mobile phones.

Transpilers to other languages

Some tools can change Python code into other programming languages:

  • Brython and Transcrypt change Python into JavaScript.
  • Cython changes Python into C code.
  • Nuitka changes Python into C code for better performance.
  • Numba can make parts of Python code run faster.
  • Pythran changes Python into C++ code.
  • RPython is used to build the PyPy interpreter.

Performance

There are ways to make Python programs run faster:

  • Using tools that change Python code while it runs to make it quicker.
  • Compiling Python code into machine code before running it.
  • Running many tasks at the same time.
  • Using special data types for certain jobs.
  • Using powerful libraries like NumPy, which use faster languages under the hood.

Language development

Python's development uses a process called Python Enhancement Proposal (PEP) to suggest new features and make decisions. People and a group of leaders look at these ideas.

There are three types of Python releases:

  • Versions that change the first number, which might stop old code from working. These happen rarely.
  • Updates that add new features but keep old code working. These happen about once a year.
  • Small updates that fix problems without adding new features. These happen every few months.

Before each final release, there are preview versions for testing. Python's developers check the code with many tests. The main conference for Python is called PyCon, and there are special programs to help new Python users, like PyLadies.

Naming

Python's name comes from a British comedy group called Monty Python. The person who made Python, Guido van Rossum, liked this group when he was creating the language. Because of this, you will often see jokes and references to Monty Python in Python code and documents. For example, special words used in examples are sometimes spam and eggs instead of the usual foo and bar. People who use Python are sometimes called "Pythonistas".

Languages influenced by Python

Many programming languages were inspired by Python. For example, Cobra lists Python as a key influence. ECMAScript and JavaScript took ideas like iterators and generators from Python. Go aims to work as quickly as a dynamic language like Python. Julia was created to be as easy to use for general tasks as Python. Mojo builds directly on Python, while GDScript is also heavily inspired by it. Other languages such as Groovy, Boo, CoffeeScript, F#, Nim, Ruby, Swift, and V have also been influenced by Python.

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Python (programming language), available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.