Python Glossary 📖
Glossary
A glossary of common Python terms.
✨ Terms
Argument
A value passed to a function (or method) when calling the function.
Attribute
A value associated with an object which is referenced by name using dotted expressions.
Block
A group of statements in a program or script.
Class
A template for creating user-defined objects.
Docstring
A string literal which appears as the first expression in a class, function or module.
Dictionary
An associative array, where arbitrary keys are mapped to values.
Function
A series of statements which returns some value to a caller.
Immutable
An object with a fixed value.
Import
The process by which Python code in one module is made available to Python code in another module.
Iterable
An object capable of returning its members one at a time.
List
A built-in Python sequence.
Module
An object that serves as an organizational unit of Python code.
Mutable
Mutable objects can change their value but keep their id.
Object
Any data with state (attributes or value) and defined behavior (methods).
Package
A Python module which can contain submodules or recursively, subpackages.
Parameter
A named entity in a function (or method) definition that specifies an argument (or in some cases, arguments) that the function can accept.
Sequence
An iterable which supports efficient element access using integer indices via the __getitem__() special method and defines a __len__() method that returns the length of the sequence.
Slice
An object usually containing a portion of a sequence.
Statement
A statement is part of a suite (a "block" of code).
Tuple
A built-in Python sequence.
Type
The type of a Python object determines what kind of object it is.
💡 Did You Know?
This glossary is just a starting point. Python is a rich language with many more terms and concepts.