A "data structure" is a way of organizing information (i.e.: collections of data) Real/Physical world examples: * A list where you add your friend's name and phone number and any other notes one by one as you get them. * A "Contacts" book where you add your friend's names but put them in the appropriate alphabetical section. * A "Rolodex" (or box of index cards) where each person get's their own card. * A grid of columns and rows you draw on graph paper where all names are in the same column, etc. Each of these is a different way to organize or structure the data. AKA: A different data structure. Each has advantages and disadvantages. * Some are easier to get started with (implement). Like the list. * Some are easier to find a name quickly (like the contact book) * Some are easier to add a new person in the middle (like the Rolodex/Index Cards) * Some take up more physical space and are harder to carry around (Like the Rolodex) You choose which to use based on your own criteria. Do you have a small number of people so a little list of 10 is fine? Do you have a large list of people (like 100) where a list would be unwieldly so you buy a little contacts book with alphabetic tabs on the side? Do you add and remove people frequently (like in a business) where a Rolodex is better? Do you need to take the numbers with you (like when you go on vacation) so a little book is better? Or do you only need the numbers when at your desk at work, where a big fat Rolodex is fine?? As far as the built in strings, integers, Booleans, etc.: Programmers generally call those data types, not data structures. Are they technically little data structures? Yeah, maybe. But it's not worth worrying about. Just call those data types and the bigger things data structures. Answer from DominicPalladino on reddit.com
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-data-structures
Python Data Structures - GeeksforGeeks
We will discuss all the in-built data structures like list tuples, dictionaries, etc. as well as some advanced data structures like trees, graphs, etc. Python Lists are just like the arrays, declared in other languages which is an ordered collection of data. It is very flexible as the items in a list do not need to be of the same type.
Published   July 23, 2025
🌐
Real Python
realpython.com › python-data-structures
Common Python Data Structures (Guide) – Real Python
October 21, 2023 - Some parking lots may be restricted to only one type of vehicle. For example, a motor home parking lot wouldn’t allow bikes to be parked on it. A restricted parking lot corresponds to a typed array data structure that allows only elements that have the same data type stored in them. Performance-wise, it’s very fast to look up an element contained in an array given the element’s index. A proper array implementation guarantees a constant O(1) access time for this case. Python includes several array-like data structures in its standard library that each have slightly different characteristics.
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.3 documentation
We saw that lists and strings have many common properties, such as indexing and slicing operations. They are two examples of sequence data types (see Sequence Types — list, tuple, range). Since Python is an evolving language, other sequence data types may be added.
🌐
Corporate Finance Institute
corporatefinanceinstitute.com › home › resources › python data structures
Python Data Structures - Overview, Types, Examples
November 23, 2023 - Lists, sets, and tuples are the basic data structures in the Python programming language. One of the differing points among the data structures is mutability, which is the ability to change an object after its creation.
🌐
Vagrant
ashki23.github.io › python-str.html
Python data structures
Dictionaries (also called dicts) are key data structure including a set of keys and values. Unlike sequences (e.g. lists and tuples) which are indexed by a range of numbers, dictionaries are indexed by unique and immutable keys. At the same time, values of the list could be any type (mutable or immutable) and duplicated.
🌐
Dataquest
dataquest.io › blog › data-structures-in-python
Python Data Structures: Lists, Dictionaries, Sets, Tuples – Dataquest
May 12, 2025 - Python has four main data structures split between mutable (lists, dictionaries, and sets) and immutable (tuples) types. Lists are useful to hold a heterogeneous collection of related objects.
🌐
Edureka
edureka.co › blog › data-structures-in-python
Data Structures in Python | List, Tuple, Dict, Sets, Stack, Queue
November 27, 2024 - The collections module in Python provides specialized container data types that extend the functionality of built-in types like lists, dictionaries, and tuples. Here are some key data structures from the collections module, along with code examples and its output:
🌐
Airbyte
airbyte.com › data integration platform › data engineering resources › 11 types of python data structures for data analysis
11 Types Of Python Data Structures For Data Analysis | Airbyte
September 2, 2025 - Python data structures, including mutable types like lists, dictionaries, and sets, and immutable types like tuples, form the backbone of efficient data analysis and engineering workflows.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › what are data structures anyway?
r/learnpython on Reddit: What are data structures anyway?
August 18, 2024 -

Let me try to frame my question. Self learner here.

For some reason I thought that string, integer, list, set, tuple and dictionary are data structures and every language has came up with its own data structures. I guess some languages have array and etc.

However, recently I've started a course on data structures and it teaches Linked List, Stack and Trees. None of them are implemented in Python out of box (as long as I understand). And yet if one asks ChatGPT if Python has Stack here is the answer: "Yes, Python provides several ways to implement a stack, even though it doesn't have a built-in stack data structure explicitly named "Stack." The most common ways to implement a stack in Python are:...". Turns out Python's list is a Stack where you can append() and pop() elements. On top of this "Python's collections module provides a deque (double-ended queue) that is optimized for fast appends and pops from both ends."

So I am confused now, and trying to make sence of all this info.

What is data structure, who came up with them and who defines them? Are they kind of protocols and programmers are agree on?

Top answer
1 of 21
126
A "data structure" is a way of organizing information (i.e.: collections of data) Real/Physical world examples: * A list where you add your friend's name and phone number and any other notes one by one as you get them. * A "Contacts" book where you add your friend's names but put them in the appropriate alphabetical section. * A "Rolodex" (or box of index cards) where each person get's their own card. * A grid of columns and rows you draw on graph paper where all names are in the same column, etc. Each of these is a different way to organize or structure the data. AKA: A different data structure. Each has advantages and disadvantages. * Some are easier to get started with (implement). Like the list. * Some are easier to find a name quickly (like the contact book) * Some are easier to add a new person in the middle (like the Rolodex/Index Cards) * Some take up more physical space and are harder to carry around (Like the Rolodex) You choose which to use based on your own criteria. Do you have a small number of people so a little list of 10 is fine? Do you have a large list of people (like 100) where a list would be unwieldly so you buy a little contacts book with alphabetic tabs on the side? Do you add and remove people frequently (like in a business) where a Rolodex is better? Do you need to take the numbers with you (like when you go on vacation) so a little book is better? Or do you only need the numbers when at your desk at work, where a big fat Rolodex is fine?? As far as the built in strings, integers, Booleans, etc.: Programmers generally call those data types, not data structures. Are they technically little data structures? Yeah, maybe. But it's not worth worrying about. Just call those data types and the bigger things data structures.
2 of 21
42
First rule of LLMs: never trust their output.
🌐
Analytics Vidhya
analyticsvidhya.com › home › data structures in python
Data Structures in Python
April 3, 2025 - Ans. Data structures in Python are ways to organize and store data. Common ones include lists, tuples, dictionaries, sets, and more advanced ones like stacks, queues, and linked lists. Q2. What are the 4 types of data structure?
🌐
Built In
builtin.com › data-science › python-data-structures
What Are Python Data Structures? (Definition, Examples) | Built In
There are four main types of built-in Python data structures: lists, tuples, sets and dictionaries.
Published   June 23, 2025
🌐
Educative
educative.io › blog › 8-python-data-structures
8 common data structures in Python every programmer must know
Dictionary (dict): Similar to hashmap or hash tables in other languages, a dictionary is a collection of key/value pairs. You initialize an empty dictionary with empty curly braces and fill it with colon separated keys and values. All keys are unique, immutable objects. Now, let’s see how we can use these structures to create all the advanced structures interviewers are looking for. Python does not have a built in array type, but you can use lists for all of the same tasks.
🌐
DataCamp
datacamp.com › tutorial › data-structures-python
Python Data Structures with Primitive & Non-Primitive Examples | DataCamp
April 6, 2023 - Generally, data structures can be divided into two categories in computer science: primitive and non-primitive data structures. The former are the simplest forms of representing data, whereas the latter are more advanced: they contain primitive data structures within more complex data structures ...
🌐
TutorialsPoint
tutorialspoint.com › home › python_data_structure › introduction to python data structures
Introduction to Python Data Structures
February 21, 2009 - List − It is similar to array with the exception that the data elements can be of different data types. You can have both numeric and string data in a python list. Tuple − Tuples are similar to lists but they are immutable which means the values in a tuple cannot be modified they can only be read. Dictionary − The dictionary contains Key-value pairs as its data elements. In the next chapters we are going to learn the details of how each of these data structures can be implemented using Python.
🌐
Coding Dojo
codingdojo.com › blog › top-python-data-structures
Top 3 Python Data Structures Explained - Coding Dojo
May 30, 2022 - The four primitive data structures are integers, float, string, and boolean. Non-primitive Data Structures – These data structures store values, as well as a collection of values, in varying formats.
🌐
Codecademy
codecademy.com › article › python-data-structures
A Guide to Python Data Structures | Codecademy
Heterogeneous: Lists can contain a mix of data types (e.g., integers, strings, other lists). Indexable and iterable: We can access elements using indices and loop through them using loops like for or while. Supports nesting: Lists can contain other lists or even more complex structures like dictionaries. Here is an example that demonstrates the usage of lists in Python:
🌐
Medium
medium.com › @techwithpraisejames › a-beginners-guide-to-mastering-python-data-structures-with-practical-examples-95befa4fb367
A Beginner’s Guide to Mastering Python Data Structures | by Praise James | Medium
April 11, 2025 - However, for this article, we are focused squarely on the four built-in data structures. A list is an ordered collection of elements. These elements can be strings, numbers, Boolean values, or any other valid Python object. Lists are very similar to arrays in C and Java and are very useful when manipulating data sequences. i. A list is mutable, meaning you can modify the elements in a list. You can add, remove, and even change the elements in a list. ii. Unlike some statically typed programming languages like C, Java, or Rust, Python lists can contain elements of different data types.
🌐
ScholarHat
scholarhat.com › home
Data Structures in Python - Types & Examples(A Complete Guide)
September 10, 2025 - Non-Primitive Data Structures: They don't just store a value, but rather a collection of values in various formats. They can store data of more than one type. Non-primitive data structures can further be categorized into two categories: Built-In: Python offers implicit support for built-in structures that enable storing and accessing data e.g.
🌐
Geekedu
geekedu.org › blogs › data-structures-in-python-everything-you-need-to-know
Data Structures in Python: Everything you need to know! | Coding for Kids Free
Non-primitive data types include List, Array, Tuples, Dictionary, Sets, and Files, while primitive data types include Integers, Float, Strings, and Boolean. In Python, there is another type of data structure called user-defined which is basically ...