Skip to content

abstract data type (ADT)

An abstract data type, or ADT, is a model of a data structure defined by the operations it supports and how those operations behave, independent of how they are implemented. It specifies what can be done with the data, not how the data is stored internally.

This separation between interface and implementation is the central idea. A stack, for example, is defined by its push and pop operations and by the rule that the last item pushed is the first one popped. That contract holds whether the stack is backed by an array or a linked list, and the calling code talks only to the operations:

Calling code uses a Stack ADT, defined by push, pop, and last in first out, that can be backed by an array or a linked list.
One Stack ADT Contract, Many Implementations

Classic examples include the stack, the queue, the list, the set, and the map. An abstract data type is a specification, while a data structure is a concrete way to fulfill it, so the same ADT can have several implementations with different performance.

Describing data in terms of an ADT lets designers reason about behavior before committing to an implementation and its time complexity. Object-oriented languages express ADTs through classes and interfaces, and Python’s collections.abc module defines abstract base classes in this spirit.

Tutorial

Implementing Interfaces in Python: ABCs and Protocols

Learn how to implement interfaces in Python using abstract base classes, Protocols, and duck typing, and enforce method contracts cleanly.

advanced python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated June 22, 2026 • Reviewed by Leodanis Pozo Ramos