René's URL Explorer Experiment


Title: Common Python Data Structures (Guide) – Real Python

Open Graph Title: Common Python Data Structures (Guide) – Real Python

Description: In this tutorial, you'll learn about Python's data structures. You'll look at several implementations of abstract data types and learn which implementations are best for your specific use cases.

Open Graph Description: In this tutorial, you'll learn about Python's data structures. You'll look at several implementations of abstract data types and learn which implementations are best for your specific use cases.

Mail addresses
?subject=Python article for you&body=Common Python Data Structures (Guide) on Real Python https://realpython.com/python-data-structures/

Opengraph URL: https://realpython.com/python-data-structures/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Common Python Data Structures (Guide)",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Python-Tricks-Chapter-on-Data-Structures_Watermarked.b5d9d86333c3.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-data-structures/",
    "lastReviewed": "2023-10-21",
    "author": {
      "@type": "Person",
      "name": "Dan Bader",
      "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/daniel-square.d58bf4388750.jpg",
      "url": "https://realpython.com/team/dbader/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "David Amos",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/me-small.f5f49f1c48e1.jpg",
        "url": "https://realpython.com/team/damos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Jacob Schmitt",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/profile-small_js.2f4d0d8da1ca.jpg",
        "url": "https://realpython.com/team/jschmitt/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2020-08-26T14:00:00+00:00",
  "dateModified": "2023-10-21T02:54:47.213533+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Dan Bader",
    "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/daniel-square.d58bf4388750.jpg",
    "url": "https://realpython.com/team/dbader/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "In this tutorial, you'll learn about Python's data structures. You'll look at several implementations of abstract data types and learn which implementations are best for your specific use cases."
}

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Python-Tricks-Chapter-on-Data-Structures_Watermarked.b5d9d86333c3.jpg
og:imagehttps://files.realpython.com/media/Python-Tricks-Chapter-on-Data-Structures_Watermarked.b5d9d86333c3.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-data-structures/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-data-structures/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-data-structures%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-data-structures/#toc
Dictionaries, Maps, and Hash Tableshttps://realpython.com/python-data-structures/#dictionaries-maps-and-hash-tables
dict: Your Go-to Dictionaryhttps://realpython.com/python-data-structures/#dict-your-go-to-dictionary
collections.OrderedDict: Remember the Insertion Order of Keyshttps://realpython.com/python-data-structures/#collectionsordereddict-remember-the-insertion-order-of-keys
collections.defaultdict: Return Default Values for Missing Keyshttps://realpython.com/python-data-structures/#collectionsdefaultdict-return-default-values-for-missing-keys
collections.ChainMap: Search Multiple Dictionaries as a Single Mappinghttps://realpython.com/python-data-structures/#collectionschainmap-search-multiple-dictionaries-as-a-single-mapping
types.MappingProxyType: A Wrapper for Making Read-Only Dictionarieshttps://realpython.com/python-data-structures/#typesmappingproxytype-a-wrapper-for-making-read-only-dictionaries
Dictionaries in Python: Summaryhttps://realpython.com/python-data-structures/#dictionaries-in-python-summary
Array Data Structureshttps://realpython.com/python-data-structures/#array-data-structures
list: Mutable Dynamic Arrayshttps://realpython.com/python-data-structures/#list-mutable-dynamic-arrays
tuple: Immutable Containershttps://realpython.com/python-data-structures/#tuple-immutable-containers
array.array: Basic Typed Arrayshttps://realpython.com/python-data-structures/#arrayarray-basic-typed-arrays
str: Immutable Arrays of Unicode Charactershttps://realpython.com/python-data-structures/#str-immutable-arrays-of-unicode-characters
bytes: Immutable Arrays of Single Byteshttps://realpython.com/python-data-structures/#bytes-immutable-arrays-of-single-bytes
bytearray: Mutable Arrays of Single Byteshttps://realpython.com/python-data-structures/#bytearray-mutable-arrays-of-single-bytes
Arrays in Python: Summaryhttps://realpython.com/python-data-structures/#arrays-in-python-summary
Records, Structs, and Data Transfer Objectshttps://realpython.com/python-data-structures/#records-structs-and-data-transfer-objects
dict: Simple Data Objectshttps://realpython.com/python-data-structures/#dict-simple-data-objects
tuple: Immutable Groups of Objectshttps://realpython.com/python-data-structures/#tuple-immutable-groups-of-objects
Write a Custom Class: More Work, More Controlhttps://realpython.com/python-data-structures/#write-a-custom-class-more-work-more-control
dataclasses.dataclass: Python 3.7+ Data Classeshttps://realpython.com/python-data-structures/#dataclassesdataclass-python-37-data-classes
collections.namedtuple: Convenient Data Objectshttps://realpython.com/python-data-structures/#collectionsnamedtuple-convenient-data-objects
typing.NamedTuple: Improved Namedtupleshttps://realpython.com/python-data-structures/#typingnamedtuple-improved-namedtuples
struct.Struct: Serialized C Structshttps://realpython.com/python-data-structures/#structstruct-serialized-c-structs
types.SimpleNamespace: Fancy Attribute Accesshttps://realpython.com/python-data-structures/#typessimplenamespace-fancy-attribute-access
Records, Structs, and Data Objects in Python: Summaryhttps://realpython.com/python-data-structures/#records-structs-and-data-objects-in-python-summary
Sets and Multisetshttps://realpython.com/python-data-structures/#sets-and-multisets
set: Your Go-to Sethttps://realpython.com/python-data-structures/#set-your-go-to-set
frozenset: Immutable Setshttps://realpython.com/python-data-structures/#frozenset-immutable-sets
collections.Counter: Multisetshttps://realpython.com/python-data-structures/#collectionscounter-multisets
Sets and Multisets in Python: Summaryhttps://realpython.com/python-data-structures/#sets-and-multisets-in-python-summary
Stacks (LIFOs)https://realpython.com/python-data-structures/#stacks-lifos
list: Simple, Built-in Stackshttps://realpython.com/python-data-structures/#list-simple-built-in-stacks
collections.deque: Fast and Robust Stackshttps://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-stacks
queue.LifoQueue: Locking Semantics for Parallel Computinghttps://realpython.com/python-data-structures/#queuelifoqueue-locking-semantics-for-parallel-computing
Stack Implementations in Python: Summaryhttps://realpython.com/python-data-structures/#stack-implementations-in-python-summary
Queues (FIFOs)https://realpython.com/python-data-structures/#queues-fifos
list: Terribly Sloooow Queueshttps://realpython.com/python-data-structures/#list-terribly-sloooow-queues
collections.deque: Fast and Robust Queueshttps://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-queues
queue.Queue: Locking Semantics for Parallel Computinghttps://realpython.com/python-data-structures/#queuequeue-locking-semantics-for-parallel-computing
multiprocessing.Queue: Shared Job Queueshttps://realpython.com/python-data-structures/#multiprocessingqueue-shared-job-queues
Queues in Python: Summaryhttps://realpython.com/python-data-structures/#queues-in-python-summary
Priority Queueshttps://realpython.com/python-data-structures/#priority-queues
list: Manually Sorted Queueshttps://realpython.com/python-data-structures/#list-manually-sorted-queues
heapq: List-Based Binary Heapshttps://realpython.com/python-data-structures/#heapq-list-based-binary-heaps
queue.PriorityQueue: Beautiful Priority Queueshttps://realpython.com/python-data-structures/#queuepriorityqueue-beautiful-priority-queues
Priority Queues in Python: Summaryhttps://realpython.com/python-data-structures/#priority-queues-in-python-summary
Conclusion: Python Data Structureshttps://realpython.com/python-data-structures/#conclusion-python-data-structures
https://realpython.com/feedback/survey/article/python-data-structures/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-data-structures/disliked/?from=article-sidebar
Stacks and Queues: Selecting the Ideal Data Structurehttps://realpython.com/courses/stacks-queues-ideal-data-structure/
Dan Baderhttps://realpython.com/python-data-structures/#author
https://realpython.com/python-data-structures/#reader-comments
basicshttps://realpython.com/tutorials/basics/
data-structureshttps://realpython.com/tutorials/data-structures/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
Dictionaries, Maps, and Hash Tableshttps://realpython.com/python-data-structures/#dictionaries-maps-and-hash-tables
dict: Your Go-to Dictionaryhttps://realpython.com/python-data-structures/#dict-your-go-to-dictionary
collections.OrderedDict: Remember the Insertion Order of Keyshttps://realpython.com/python-data-structures/#collectionsordereddict-remember-the-insertion-order-of-keys
collections.defaultdict: Return Default Values for Missing Keyshttps://realpython.com/python-data-structures/#collectionsdefaultdict-return-default-values-for-missing-keys
collections.ChainMap: Search Multiple Dictionaries as a Single Mappinghttps://realpython.com/python-data-structures/#collectionschainmap-search-multiple-dictionaries-as-a-single-mapping
types.MappingProxyType: A Wrapper for Making Read-Only Dictionarieshttps://realpython.com/python-data-structures/#typesmappingproxytype-a-wrapper-for-making-read-only-dictionaries
Dictionaries in Python: Summaryhttps://realpython.com/python-data-structures/#dictionaries-in-python-summary
Array Data Structureshttps://realpython.com/python-data-structures/#array-data-structures
list: Mutable Dynamic Arrayshttps://realpython.com/python-data-structures/#list-mutable-dynamic-arrays
tuple: Immutable Containershttps://realpython.com/python-data-structures/#tuple-immutable-containers
array.array: Basic Typed Arrayshttps://realpython.com/python-data-structures/#arrayarray-basic-typed-arrays
str: Immutable Arrays of Unicode Charactershttps://realpython.com/python-data-structures/#str-immutable-arrays-of-unicode-characters
bytes: Immutable Arrays of Single Byteshttps://realpython.com/python-data-structures/#bytes-immutable-arrays-of-single-bytes
bytearray: Mutable Arrays of Single Byteshttps://realpython.com/python-data-structures/#bytearray-mutable-arrays-of-single-bytes
Arrays in Python: Summaryhttps://realpython.com/python-data-structures/#arrays-in-python-summary
Records, Structs, and Data Transfer Objectshttps://realpython.com/python-data-structures/#records-structs-and-data-transfer-objects
dict: Simple Data Objectshttps://realpython.com/python-data-structures/#dict-simple-data-objects
tuple: Immutable Groups of Objectshttps://realpython.com/python-data-structures/#tuple-immutable-groups-of-objects
Write a Custom Class: More Work, More Controlhttps://realpython.com/python-data-structures/#write-a-custom-class-more-work-more-control
dataclasses.dataclass: Python 3.7+ Data Classeshttps://realpython.com/python-data-structures/#dataclassesdataclass-python-37-data-classes
collections.namedtuple: Convenient Data Objectshttps://realpython.com/python-data-structures/#collectionsnamedtuple-convenient-data-objects
typing.NamedTuple: Improved Namedtupleshttps://realpython.com/python-data-structures/#typingnamedtuple-improved-namedtuples
struct.Struct: Serialized C Structshttps://realpython.com/python-data-structures/#structstruct-serialized-c-structs
types.SimpleNamespace: Fancy Attribute Accesshttps://realpython.com/python-data-structures/#typessimplenamespace-fancy-attribute-access
Records, Structs, and Data Objects in Python: Summaryhttps://realpython.com/python-data-structures/#records-structs-and-data-objects-in-python-summary
Sets and Multisetshttps://realpython.com/python-data-structures/#sets-and-multisets
set: Your Go-to Sethttps://realpython.com/python-data-structures/#set-your-go-to-set
frozenset: Immutable Setshttps://realpython.com/python-data-structures/#frozenset-immutable-sets
collections.Counter: Multisetshttps://realpython.com/python-data-structures/#collectionscounter-multisets
Sets and Multisets in Python: Summaryhttps://realpython.com/python-data-structures/#sets-and-multisets-in-python-summary
Stacks (LIFOs)https://realpython.com/python-data-structures/#stacks-lifos
list: Simple, Built-in Stackshttps://realpython.com/python-data-structures/#list-simple-built-in-stacks
collections.deque: Fast and Robust Stackshttps://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-stacks
queue.LifoQueue: Locking Semantics for Parallel Computinghttps://realpython.com/python-data-structures/#queuelifoqueue-locking-semantics-for-parallel-computing
Stack Implementations in Python: Summaryhttps://realpython.com/python-data-structures/#stack-implementations-in-python-summary
Queues (FIFOs)https://realpython.com/python-data-structures/#queues-fifos
list: Terribly Sloooow Queueshttps://realpython.com/python-data-structures/#list-terribly-sloooow-queues
collections.deque: Fast and Robust Queueshttps://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-queues
queue.Queue: Locking Semantics for Parallel Computinghttps://realpython.com/python-data-structures/#queuequeue-locking-semantics-for-parallel-computing
multiprocessing.Queue: Shared Job Queueshttps://realpython.com/python-data-structures/#multiprocessingqueue-shared-job-queues
Queues in Python: Summaryhttps://realpython.com/python-data-structures/#queues-in-python-summary
Priority Queueshttps://realpython.com/python-data-structures/#priority-queues
list: Manually Sorted Queueshttps://realpython.com/python-data-structures/#list-manually-sorted-queues
heapq: List-Based Binary Heapshttps://realpython.com/python-data-structures/#heapq-list-based-binary-heaps
queue.PriorityQueue: Beautiful Priority Queueshttps://realpython.com/python-data-structures/#queuepriorityqueue-beautiful-priority-queues
Priority Queues in Python: Summaryhttps://realpython.com/python-data-structures/#priority-queues-in-python-summary
Conclusion: Python Data Structureshttps://realpython.com/python-data-structures/#conclusion-python-data-structures
Remove adshttps://realpython.com/account/join/
Stacks and Queues: Selecting the Ideal Data Structurehttps://realpython.com/courses/stacks-queues-ideal-data-structure/
standard libraryhttps://docs.python.org/3/library/index.html
Javahttps://realpython.com/oop-in-python-vs-java/
listhttps://realpython.com/python-list/
linked listhttps://realpython.com/linked-lists-python/
Python Tricks: The Bookhttps://realpython.com/products/python-tricks-book/
the rest of the bookhttps://realpython.com/products/python-tricks-book/
Get a sample chapter from Python Tricks: The Bookhttps://realpython.com/bonus/python-tricks-sample-pdf/
https://realpython.com/python-data-structures/#dictionaries-maps-and-hash-tables
dictionarieshttps://realpython.com/python-dicts/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#dict-your-go-to-dictionary
dicthttps://docs.python.org/3/library/stdtypes.html#mapping-types-dict
dictionary comprehensionshttps://realpython.com/iterate-through-dictionary-python/#using-comprehensions
hashablehttps://docs.python.org/3/glossary.html#term-hashable
Immutable typeshttps://realpython.com/courses/immutability-python/
stringshttps://realpython.com/python-strings/
numbershttps://realpython.com/python-data-types/
tuple objectshttps://realpython.com/python-lists-tuples/#python-tuples
class attributeshttps://realpython.com/python-scope-legb-rule/#class-and-instance-attributes-scope
stack framehttps://en.wikipedia.org/wiki/Call_stack#Structure
hash tablehttps://realpython.com/python-hash-table/
skip listshttps://en.wikipedia.org/wiki/Skip_list
B-tree–basedhttps://en.wikipedia.org/wiki/B-tree
https://realpython.com/python-data-structures/#collectionsordereddict-remember-the-insertion-order-of-keys
collections.OrderedDicthttps://realpython.com/python-ordereddict/
side effecthttps://mail.python.org/pipermail/python-dev/2016-September/146327.html
Python 3.8https://realpython.com/python38-new-features/
.move_to_end() methodhttps://realpython.com/python-data-types/
.popitem() methodhttps://docs.python.org/3/library/collections.html#collections.OrderedDict.popitem
https://realpython.com/python-data-structures/#collectionsdefaultdict-return-default-values-for-missing-keys
defaultdicthttps://docs.python.org/3/library/collections.html#collections.defaultdict
KeyError exceptionhttps://realpython.com/python-keyerror/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#collectionschainmap-search-multiple-dictionaries-as-a-single-mapping
collections.ChainMaphttps://docs.python.org/3/library/collections.html#collections.ChainMap
https://realpython.com/python-data-structures/#typesmappingproxytype-a-wrapper-for-making-read-only-dictionaries
MappingProxyTypehttps://docs.python.org/3/library/types.html#types.MappingProxyType
https://realpython.com/python-data-structures/#dictionaries-in-python-summary
https://realpython.com/python-data-structures/#array-data-structures
https://files.realpython.com/media/python-linked-list-array-visualization.5b9f4c4040cb.jpeg
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#list-mutable-dynamic-arrays
Listshttps://docs.python.org/3.6/library/stdtypes.html#lists
https://realpython.com/python-data-structures/#tuple-immutable-containers
tupleshttps://realpython.com/python-tuple/
https://realpython.com/python-data-structures/#arrayarray-basic-typed-arrays
array.arrayhttps://docs.python.org/3/library/array.html
mutablehttps://realpython.com/python-mutable-vs-immutable-types/
https://realpython.com/python-data-structures/#str-immutable-arrays-of-unicode-characters
strhttps://docs.python.org/3/library/stdtypes.html#text-sequence-type-str
Unicode charactershttps://realpython.com/python-encodings-guide/
recursivehttps://realpython.com/python-thinking-recursively/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#bytes-immutable-arrays-of-single-bytes
bytes objectshttps://realpython.com/python-bytes/
https://realpython.com/python-data-structures/#bytearray-mutable-arrays-of-single-bytes
bytearrayhttps://realpython.com/python-bytearray/
https://realpython.com/python-data-structures/#arrays-in-python-summary
NumPyhttps://realpython.com/numpy-array-programming/
pandashttps://realpython.com/pandas-dataframe/
https://realpython.com/python-data-structures/#records-structs-and-data-transfer-objects
Python Tricks: The Bookhttps://realpython.com/products/python-tricks-book/
the rest of the bookhttps://realpython.com/products/python-tricks-book/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#dict-simple-data-objects
previouslyhttps://realpython.com/python-data-structures/#dictionaries-maps-and-hash-tables
https://realpython.com/python-data-structures/#tuple-immutable-groups-of-objects
slightly less memoryhttps://github.com/python/cpython/blob/1a5856bf9295fa73995898d576e0bedf016aee1f/Include/tupleobject.h#L10-L34
lists in CPythonhttps://github.com/python/cpython/blob/b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8/Include/listobject.h#L4-L41
https://realpython.com/python-data-structures/#write-a-custom-class-more-work-more-control
Python classeshttps://realpython.com/python-classes/
__repr__https://docs.python.org/3.4/reference/datamodel.html#object.__repr__
@propertyhttps://docs.python.org/3/library/functions.html#property
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#dataclassesdataclass-python-37-data-classes
Data classeshttps://realpython.com/python-data-classes/
.__repr__()https://realpython.com/python-repr-vs-str/
type-checkinghttps://realpython.com/python-type-checking/
decoratorhttps://realpython.com/primer-on-python-decorators/
The Ultimate Guide to Data Classes in Python 3.7https://realpython.com/python-data-classes/
https://realpython.com/python-data-structures/#collectionsnamedtuple-convenient-data-objects
namedtuplehttps://dbader.org/blog/writing-clean-python-with-namedtuples
Write Pythonic and Clean Code With namedtuplehttps://realpython.com/python-namedtuple/
https://realpython.com/python-data-structures/#typingnamedtuple-improved-namedtuples
typing.NamedTuplehttps://docs.python.org/3/library/typing.html#typing.NamedTuple
type hintshttps://docs.python.org/3/library/typing.html
mypyhttp://mypy-lang.org/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#structstruct-serialized-c-structs
struct.Structhttps://docs.python.org/3/library/struct.html#struct.Struct
format stringshttps://docs.python.org/3/library/struct.html#struct-format-strings
https://realpython.com/python-data-structures/#typessimplenamespace-fancy-attribute-access
types.SimpleNamespacehttps://docs.python.org/3/library/types.html#types.SimpleNamespace
https://realpython.com/python-data-structures/#records-structs-and-data-objects-in-python-summary
JSONhttps://realpython.com/python-json/
@propertyhttps://realpython.com/python-property/#using-property-as-a-decorator
setters and gettershttps://realpython.com/python-getter-setter/
https://realpython.com/python-data-structures/#sets-and-multisets
sethttps://realpython.com/python-sets/
follow these performance characteristicshttps://wiki.python.org/moin/TimeComplexity
set comprehensionshttps://realpython.com/list-comprehension-python/#using-set-and-dictionary-comprehensions
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#set-your-go-to-set
sethttps://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
hashablehttps://docs.python.org/3/glossary.html#term-hashable
https://realpython.com/python-data-structures/#frozenset-immutable-sets
frozensethttps://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
https://realpython.com/python-data-structures/#collectionscounter-multisets
collections.Counterhttps://docs.python.org/3/library/collections.html#collections.Counter
Counterhttps://realpython.com/python-counter/
sum()https://realpython.com/python-sum-function/
https://realpython.com/python-data-structures/#sets-and-multisets-in-python-summary
https://realpython.com/python-data-structures/#stacks-lifos
stackhttps://realpython.com/queue-in-python/#stack-last-in-first-out-lifo
stack implementationhttps://realpython.com/how-to-implement-python-stack/
depth-first searchhttps://en.wikipedia.org/wiki/Depth-first_search
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#list-simple-built-in-stacks
makes a decent stack data structurehttps://docs.python.org/3/tutorial/datastructures.html#using-lists-as-stacks
amortizedhttps://en.wikipedia.org/wiki/Amortized_analysis
antipatternhttps://en.wikipedia.org/wiki/Anti-pattern
https://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-stacks
dequehttps://docs.python.org/3/library/collections.html#collections.deque
double-ended queuehttps://realpython.com/queue-in-python/#deque-double-ended-queue
doubly-linked listshttps://github.com/python/cpython/blob/6e8128f02e1d36e38e5866f9dc36e051caa47bc9/Modules/_collectionsmodule.c#L33-L35
collections.deque is a great choicehttps://realpython.com/linked-lists-python/#introducing-collectionsdeque
https://realpython.com/python-data-structures/#queuelifoqueue-locking-semantics-for-parallel-computing
LifoQueuehttps://docs.python.org/3/library/queue.html#queue.LifoQueue
https://realpython.com/python-data-structures/#stack-implementations-in-python-summary
parallel processinghttps://realpython.com/python-parallel-processing/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-data-structures/#queues-fifos
queuehttps://realpython.com/queue-in-python/#queue-first-in-first-out-fifo
PyConhttps://realpython.com/pycon-guide/
breadth-first searchhttps://en.wikipedia.org/wiki/Breadth-first_search
priority queuehttps://realpython.com/python-heapq-module/#data-structures-heaps-and-priority-queues
https://realpython.com/python-data-structures/#list-terribly-sloooow-queues
use a regular list as a queuehttps://docs.python.org/3/tutorial/datastructures.html#using-lists-as-queues
https://realpython.com/python-data-structures/#collectionsdeque-fast-and-robust-queues
https://realpython.com/python-data-structures/#queuequeue-locking-semantics-for-parallel-computing
queue.Queuehttps://docs.python.org/3/library/queue.html#queue.Queue
https://realpython.com/python-data-structures/#multiprocessingqueue-shared-job-queues
multiprocessing.Queuehttps://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue
global interpreter lockhttps://realpython.com/python-gil/
pickleablehttps://realpython.com/python-pickle-module/
https://realpython.com/python-data-structures/#queues-in-python-summary
https://realpython.com/python-data-structures/#priority-queues
priority queuehttps://realpython.com/queue-in-python/#priority-queue-sorted-from-high-to-low
totally-orderedhttps://en.wikipedia.org/wiki/Total_order
https://realpython.com/python-data-structures/#list-manually-sorted-queues
bisect.insorthttps://docs.python.org/3/library/bisect.html#bisect.insort
https://realpython.com/python-data-structures/#heapq-list-based-binary-heaps
heapqhttps://docs.python.org/3/library/heapq.html
implementing priority queues in Pythonhttps://realpython.com/python-heapq-module/
extra steps must be takenhttps://docs.python.org/3/library/heapq.html#priority-queue-implementation-notes
https://realpython.com/python-data-structures/#queuepriorityqueue-beautiful-priority-queues
queue.PriorityQueuehttps://docs.python.org/3/library/queue.html#queue.PriorityQueue
https://realpython.com/python-data-structures/#priority-queues-in-python-summary
https://realpython.com/python-data-structures/#conclusion-python-data-structures
the rest of the bookhttps://realpython.com/products/python-tricks-book/
Steven S. Skiena’s The Algorithm Design Manualhttps://realpython.com/asins/1848000693/
https://realpython.com/feedback/survey/article/python-data-structures/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-data-structures/disliked/?from=article-footer
Stacks and Queues: Selecting the Ideal Data Structurehttps://realpython.com/courses/stacks-queues-ideal-data-structure/
https://realpython.com/team/dbader/
» More about Danhttps://realpython.com/team/dbader/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/damos/
Davidhttps://realpython.com/team/damos/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/jschmitt/
Jacobhttps://realpython.com/team/jschmitt/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-data-structures
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-data-structures
https://realpython.com/feedback/survey/article/python-data-structures/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-data-structures/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-data-structures%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Common%20Python%20Data%20Structures%20%28Guide%29&url=https%3A%2F%2Frealpython.com%2Fpython-data-structures%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Common%20Python%20Data%20Structures%20%28Guide%29%20https%3A%2F%2Frealpython.com%2Fpython-data-structures%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-data-structures%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
basicshttps://realpython.com/tutorials/basics/
data-structureshttps://realpython.com/tutorials/data-structures/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
Stacks and Queues: Selecting the Ideal Data Structurehttps://realpython.com/courses/stacks-queues-ideal-data-structure/
Python's list Data Type: A Deep Dive With Exampleshttps://realpython.com/python-list/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-data-structures
Python Stacks, Queues, and Priority Queues in Practicehttps://realpython.com/queue-in-python/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-data-structures
Python Classes: The Power of Object-Oriented Programminghttps://realpython.com/python-classes/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-data-structures
Linked Lists in Python: An Introductionhttps://realpython.com/linked-lists-python/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-data-structures
How to Use Python Lambda Functionshttps://realpython.com/python-lambda/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-data-structures
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-data-structures%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-data-structures%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-data-structures/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.