Understanding Python programming starts with knowing its terminology. This glossary from The Coding College is your go-to resource for quick definitions and explanations of Python’s core concepts.
Why a Python Glossary Matters
Whether you’re a beginner or an experienced developer, a glossary serves as a handy reference to:
- Clarify complex concepts.
- Improve your coding vocabulary.
- Provide quick explanations while coding or learning.
Python Glossary
Here’s a collection of essential Python terms and their definitions:
A
- Argument: A value passed to a function when calling it.
- Attribute: A value or method associated with an object, accessed using the dot (
.
) notation.
B
- Boolean: A data type with two possible values:
True
orFalse
. - Bytecode: A low-level representation of Python code, executed by the Python interpreter.
C
- Class: A blueprint for creating objects, encapsulating data (attributes) and methods (functions).
- Comprehension: A concise way to generate sequences like lists, sets, or dictionaries. Example:
[x**2 for x in range(5)]
.
D
- Decorator: A special function that modifies another function or method.
- Dictionary: A mutable collection of key-value pairs.
E
- Exception: An error that occurs during program execution, which can be caught and handled using
try-except
.
F
- Function: A block of reusable code defined using the
def
keyword.
G
- Generator: A function that yields values one at a time using the
yield
keyword, often used for memory-efficient iteration. - Global Variable: A variable defined outside any function, accessible throughout the script.
H
- Hashable: An object with a fixed hash value, usable as a key in a dictionary.
I
- Iterable: Any object capable of returning its members one at a time, such as lists, tuples, and strings.
- Iterator: An object that produces elements from an iterable, one at a time.
J
- JSON: (JavaScript Object Notation) A lightweight format for data exchange, supported natively in Python using the
json
module.
K
- Keyword: Reserved words in Python, such as
def
,if
, andclass
, which have special meanings and cannot be used as variable names.
L
- Lambda: An anonymous function defined using the
lambda
keyword. Example:lambda x: x + 10
. - List: A mutable, ordered collection of items.
M
- Module: A file containing Python definitions and statements, which can be imported into other Python programs.
N
- Namespace: A container for variable names and their values. Example:
globals()
represents the global namespace. - None: A special value representing the absence of a value or a null value in Python.
O
- Object: An instance of a class, encompassing data and functionality.
P
- PEP: Python Enhancement Proposal, a design document for new features or guidelines.
- Package: A collection of Python modules organized in directories with an
__init__.py
file.
Q
- Queue: A data structure that follows the First In First Out (FIFO) principle.
R
- Recursion: A function calling itself directly or indirectly.
- Regular Expression: A pattern-matching technique supported by the
re
module.
S
- Set: An unordered collection of unique items.
- Slice: A part of a sequence, like a substring of a string.
T
- Tuple: An immutable, ordered collection of items.
- Type: The classification of an object, such as
int
,float
, orstr
.
U
- Unpacking: Extracting values from an iterable into variables. Example:
a, b = [1, 2]
.
V
- Variable: A name associated with a value stored in memory.
W
- Whitespace: Characters like spaces and tabs, which Python uses for indentation and structure.
X
- XML: A markup language supported in Python for data storage and exchange.
Y
- Yield: A keyword used in a generator function to produce a value without exiting the function.
Z
- Zip: A built-in function that combines two or more iterables into tuples.
How to Use This Glossary
Bookmark this page on The Coding College to refer back whenever you come across unfamiliar Python terms. Understanding Python terminology is key to mastering the language.
Explore More Python Resources
Check out our detailed tutorials, guides, and exercises on The Coding College to take your Python skills to the next level!