{"id":11353,"date":"2022-05-30T07:00:43","date_gmt":"2022-05-30T14:00:43","guid":{"rendered":"https:\/\/www.codingdojo.com\/blog\/?p=11353"},"modified":"2022-05-30T07:00:43","modified_gmt":"2022-05-30T14:00:43","slug":"top-python-data-structures","status":"publish","type":"post","link":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures","title":{"rendered":"Top 3 Python Data Structures Explained"},"content":{"rendered":"\n<p>If you\u2019ve <a href=\"https:\/\/www.codingdojo.com\/blog\/how-to-learn-python\">just started learning Python<\/a>, you\u2019ve probably come across Python data structures. Though they might seem complicated at first, data structures are useful tools that will help you\u00a0solve problems more quickly, carry out tasks more efficiently, and write better code in Python.\u00a0<\/p>\n\n\n\n<p>In the following sections, we\u2019ll dive into the different data structures and understand the roles that they play in <a href=\"https:\/\/www.codingdojo.com\/what-is-python-programming\">Python programming<\/a>. We\u2019ll also cover how you can master data structures to carry out specific projects.\u00a0\u00a0<\/p>\n\n\n<h2 class=\"wp-block-heading\">What Are Data Structures in Python?<\/h2>\n\n\n<p>Data structures organize and store data in order to make it easier to access, modify, and navigate data. These code structures explain the relationship between data and the different logical operations that you can perform on that data. Data structures also determine the functionalities that you can implement on data and how you collect it.\u00a0<\/p>\n\n\n<p>Python has four built-in data structures:<\/p>\n\n\n<ul class=\"wp-block-list\">\n<li>Lists<\/li>\n<li>Tuples<\/li>\n<li>Sets\u00a0<\/li>\n<li>Dictionaries\u00a0<\/li>\n<\/ul>\n\n\n<p>You can use these Python data structures to solve specific tasks and situations, as well as provide an easy framework to organize programs.\u00a0<\/p>\n\n\n<h2 class=\"wp-block-heading\">Why Are Data Structures Important in Python?<\/h2>\n\n\n<p>The proper management, organization, and storage of large datasets is important since it allows easier access and modifications. Data structures allow you to organize your data in a systematic and logical way, enabling you to solve problems more quickly and efficiently.\u00a0<\/p>\n\n\n<p>Some data structures allow you to quickly retrieve specific data from a database, build clear relational or hierarchical connections between data points, or speed up data processing.\u00a0<\/p>\n\n\n<p>While there are many ways to classify data structures in Python, one way is to categorize them into primitive and non-primitive data types.\u00a0<\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=6o3HSCElcgk\">https:\/\/www.youtube.com\/watch?v=6o3HSCElcgk<\/a><\/p>\n\n\n<h2 class=\"wp-block-heading\">Types of Data Structures in Python<\/h2>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Primitive Data Structures<\/strong> &#8211; These data structures contain simplified data values and serve as the foundation for manipulating data. The four primitive data structures are <em>integers<\/em>, <em>float<\/em>, <em>string<\/em>, and <em>boolean<\/em>.\u00a0<\/li>\n<li><strong>Non-primitive Data Structures<\/strong> &#8211; These data structures store values, as well as a collection of values, in varying formats. The four built-in non-primitive data structures are <em>lists<\/em>, <em>tuples<\/em>, <em>dictionaries<\/em>, and <em>sets.<\/em>\u00a0<\/li>\n<\/ul>\n\n\n<p>For a deeper dive into the core semantics and syntax of Python, check out the <a href=\"https:\/\/docs.python.org\/3\/reference\/index.html#reference-index\">official Python Language Reference<\/a>.\u00a0<\/p>\n\n\n<h2 class=\"wp-block-heading\">Built-in Python Data Structures (Non-primitive)<\/h2>\n\n\n<p>As the name suggests, these non-primitive data structures are built-in with Python. Most existing Python data structures are modified forms of these non-primitive data structures or have built their foundation on one of these data structures.\u00a0<\/p>\n\n\n<h3>1. Lists in Python<\/h3>\n\n\n<p>A list is an ordered collection of items and is one of the most essential data structures to implement in any Python project. As these are \u201cordered collections,\u201d each item in the list has an order which uniquely identifies it.\u00a0<\/p>\n\n\n<p>You can assign addresses to each element of the list (which are indexes). The index value begins at zero and continues on until the last element (the positive index). There is also the negative index, which starts at -1. This enables you to access elements from the very end to the very beginning.\u00a0<\/p>\n\n\n<p>When creating a list, you should enclose all the items on the list within square brackets, and separate them by commas. This lets Python know that you\u2019ve created a list.<\/p>\n\n\n<p>Here is a basic list:\u00a0<\/p>\n\n\n<p><strong>List_C = [item 1, item 2, item 3\u2026.., item n]\u00a0\u00a0<\/strong><\/p>\n\n\n<p>Lists created in Python are mutable\u2014meaning you can modify them after you\u2019ve created them. This allows a user to search, add, shift, delete, and move elements from a list.\u00a0<\/p>\n\n\n<h3>2. Sets in Python<\/h3>\n\n\n<p>Sets are an unorganized collection of unique elements. Just like lists, sets are mutable (meaning you can alter, replace, or add them after you create them). And just like lists,<\/p>\n\n\n<p>you need to enclose sets within curly brackets to show up in the final output. However, no two values should ever be the same.<\/p>\n\n\n<p>You can use sets when the inclusion of an object in a collection is more important than the order of the objects.\u00a0<\/p>\n\n\n<p>Here is a basic set:<\/p>\n\n\n<p>\u200b\u200b<strong>set_c = {\u201citem 1\u201d, \u201citem 2\u201d, \u201citem 3\u201d,\u2026.., \u201citem n\u201d}<\/strong><\/p>\n\n\n<h3>3. Tuples in Python<\/h3>\n\n\n<p>While tuples are similar to lists, they\u2019re immutable (meaning you can\u2019t alter them after you\u2019ve created them). Like lists, they also present an ordered collection of objects but are purposely designed to have limited functionality.\u00a0<\/p>\n\n\n<p>While the elements found in a list are enclosed within parentheses, in tuples, the use of parentheses is optional.\u00a0<\/p>\n\n\n<p>Here is a basic tuple:<\/p>\n\n\n<p><strong>tuple_A = (item 1, item 2, item 3,\u2026, item n)<\/strong><\/p>\n\n\n<h3>4. Dictionary in Python<\/h3>\n\n\n<p>In Python, a dictionary is an unorganized and mutable container that stores key-value pairs. You can access the values in the dictionary by entering a unique key.\u00a0<\/p>\n\n\n<p>You can make dictionaries using curly brackets, but they must include key-value pairs separated with commas. A colon must separate each key from its value.\u00a0<\/p>\n\n\n<p>Here is the basic syntax:<\/p>\n\n\n<p><strong>dictionary = {&#8220;key name&#8221;: value}<\/strong><\/p>\n\n\n<h2 class=\"wp-block-heading\">User-Defined Data Structures in Python (Non-primitive)<\/h2>\n\n\n<h3 class=\"wp-block-heading\">1. LinkedList in Python<\/h3>\n\n\n<p>Linkedlists are linear data structures that contain multiple nodes. They\u2019re linked with each other using pointers, while the node of each linkedlist consists of data and a pointer called \u201cnext.\u201d These data structures are most often found in music players and image viewing apps.\u00a0\u00a0\u00a0<\/p>\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/Zb5Y7d3Cn7gs3M5mjAIqtpX5QQApN3Eu-gMQPIOc-eCPW1_jH5CkkU_wsJUfejdmZ08PYuYsxx61gePmCYOfja7mRvY-NPEeoBaH0UpE2e-ylq9Qx0JA0Gai1DSE88Q45pQ_kffiiQuUtTko6w\" alt=\"LinkedList in Python\" width=\"720\" height=\"208\" class=\"alignnone\" \/><\/figure>\n\n\n<p><em>Alt Text=\u201dillustration of linkedlist, Python data structure\u201d<\/em><\/p>\n\n\n<p><em>Image Source: <\/em><a href=\"https:\/\/www.alphacodingskills.com\/ds\/linked-list.php\"><em>Alpha Coding Skills<\/em><\/a><\/p>\n\n\n<p>While the standard Python library does not have linkedlists, programmers can implement this data structure by using nodes.\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\">2. Stack in Python<\/h3>\n\n\n<p>Stacks are linear data structures that store data in stacks. They\u2019re based on the principles of\u00a0 First-In\/Last-Out (FILO) and Last-In\/First-Out (LIFO). The insertion of a new element at one end triggers the removal of an element from the same end. You can use the operations \u201cpush\u201d and \u201cpop\u201d to signal insertions and deletions.\u00a0<\/p>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/JMPCAtKBhytniHS80OMKchLCKvd3c7WB622dj5UodcJJ_wCYgxUsocDD29DASbwjBWUnq0AF3t7Fqukrzw7g4N17geLnSr6_R46MqFGspPJALJrrWgK23C_QmkqYdRaT2NPjXKya2v3vEjKASA\" alt=\"Stack in Python\" width=\"558\" height=\"316\" class=\"alignnone\" \/><\/figure>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/_x3J989_ml1DTAxHqOzbQXucz1zLdkG80APdy5Aoi09bGLfGIETwieC6Mk6l-u7EJKFcRz4NdAIDBNX5vTQVCXE17YLivmcOqTE__V9_hacNi98ZVVR9spbl78Xw0bFDIfSTMN9Q2ciAqTVrsw\" alt=\"Stack elements in Python\" width=\"606\" height=\"310\" class=\"alignnone\" \/><\/figure>\n\n\n<p><em>Alt Text=\u201dillustration of push and pop principle in stack, Python data structure\u201d<\/em><\/p>\n\n\n<p><em>Image Source: <\/em><a href=\"https:\/\/www.alphacodingskills.com\/python\/pages\/stack-in-python.php\"><em>Alpha Coding Skills<\/em><\/a><\/p>\n\n\n<p>You can implement stacks by using data structures and modules from the Python library. These include queue.LifoQueue, collections.deque, and list.<\/p>\n\n\n<h3 class=\"wp-block-heading\">3. Queue in Python<\/h3>\n\n\n<p>These linear data structures have items stored in the First-In\/First-Out (FIFO) principle. This means that the data entered first will be accessed first. You can build queues using the array structure and have operations that you can perform on both ends of the queue (i.e. head-tail or front-back).\u00a0<\/p>\n\n\n<p>The operations related to queue include enqueue (adding elements) and dequeue (deleting elements). You can implement queues using data structures and modules from the Python library. These include queue, collections, deque, and list.<\/p>\n\n\n<h3 class=\"wp-block-heading\">4. Tree in Python<\/h3>\n\n\n<p>These are non-linear data structures and have both roots and nodes. The root is the original node that the data originates from and the nodes are the other available data points. The first node is known as the parent, and the node that follows is known as the child.\u00a0<\/p>\n\n\n<p>Trees have levels that display the level of depth of the data. In this structure, the bottom nodes are known as leaves.\u00a0<\/p>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/0DTkN9j_psb1BhC_PV1aB8d1Y707S0CKs1sYxzMNvl8pyDKIto2oLGbmln95j4kCGMeePVohbQWSlpfdOfTF6qOFvJqCQdFVDo7WOrkIsWtlOXtUCkSUatRb23hoEsyraNhnAAasppysYy5hfA\" alt=\"Tree in Python\" width=\"584\" height=\"358\" class=\"alignnone\" \/><\/figure>\n\n\n<p><em>Alt Text=\u201dillustration of the tree, Python data structure\u201d<\/em><\/p>\n\n\n<p><em>Image Source: <\/em><a href=\"https:\/\/pythonspot.com\/python-tree\/\"><em>Python Tutorials<\/em><\/a><\/p>\n\n\n<h3 class=\"wp-block-heading\">5. Graph in Python<\/h3>\n\n\n<p>In Python, a graph pictorially represents a set of objects, and some object pairs are connected by links. Vertices (nodes) represent the interconnected objects and the links that join the vertices are known as edges. You can use the Python dictionary data type to represent graphs, with the \u201ckeys\u201d of the dictionary representing the vertices. The values indicate the edges between the vertices.<\/p>\n\n\n<h3 class=\"wp-block-heading\">6. Hashmap in Python<\/h3>\n\n\n<p>You can use hashmaps to implement applications (like phonebook) and populate data according to lists, among other applications. A hash function generates the index value or address of the data element. The index value will act as the key to the data value. This allows you to access data more quickly.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Primitive Data Structures in Python<\/h2>\n\n\n<p>Primitive data structures can only store one type of data. Also, primitive data structures need to contain some type of value and the size depends on the type of data structure.\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\">1. Integers &#x200d;in Python<\/h3>\n\n\n<p>In Python, integers are zero, positive, or negative whole numerals. They do not have a fractional part and have unlimited precision.\u00a0<\/p>\n\n\n<p>Integers can have octal, binary, or hexadecimal values.\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\">2. Float in Python<\/h3>\n\n\n<p>In Python, float represents the floating point number. They\u2019re used to represent real numbers and are written with a decimal point that divides the integer and fractional parts.<\/p>\n\n\n<p>Python displays float values as 64-bit double-precision values. Meanwhile, the maximum value that any floating-point number can reach is approximately 1.8 x 10308. Python will display any number greater than this by the string inf when rendered in Python.\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\">3. String &#x200d;in Python<\/h3>\n\n\n<p>In Python, a string is a collection of alphabets, characters, or words. While it\u2019s one of the most primitive of data structures, it\u2019s also vital to data manipulation. Python has a built-in string class known as str, which is immutable.\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\">4. Boolean in Python<\/h3>\n\n\n<p>This is one of Python\u2019s built-in data types, and it represents the truth value of an expression. The Python boolean type has only two possible values: true or false. In other words, you can evaluate any expression and get either true or false in response.\u00a0<\/p>\n\n\n<h2 class=\"wp-block-heading\">Learn to Code Python at Coding Dojo<\/h2>\n\n\n<p>Python is both an exciting and challenging language to learn. Once mastered, you can <a href=\"https:\/\/www.codingdojo.com\/blog\/what-is-python-used-for\">use Python in a wide variety of applications<\/a>, ranging from data analysis and visualization, developing software and apps, to running machine learning and artificial intelligence.\u00a0<\/p>\n\n\n<p>Professionals who are proficient in Python and manipulating Python data structures are also highly sought after in the job market, with the average Python developer earning $115,835 annually!<\/p>\n\n\n<p>To take your skills and career to the next level, consider checking out our <a href=\"https:\/\/www.codingdojo.com\/\">software development courses on codingdojo.com<\/a>. We also have a free virtual event\u2014<a href=\"https:\/\/www.codingdojo.com\/intro-to-python\">Intro to Python<\/a>\u2014where we\u2019ll introduce you to the fundamentals of Python. We hope to see you soon!\u00a0<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve just started learning Python, you\u2019ve probably come across Python data structures. Though they might seem complicated at first, data structures are useful tools that will help you\u00a0solve problems more quickly, carry out tasks more efficiently, and write better code in Python.\u00a0 In the following sections, we\u2019ll dive into the different data structures and [&hellip;]<\/p>\n","protected":false},"author":1489,"featured_media":11355,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[665],"ppma_author":[2102],"class_list":["post-11353","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-posts","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Top 3 Python Data Structures Explained - Coding Dojo<\/title>\n<meta name=\"description\" content=\"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn&#039;t at all. Take a look.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Top 3 Python Data Structures Explained - Coding Dojo\" \/>\n<meta property=\"og:description\" content=\"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn&#039;t at all. Take a look.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\" \/>\n<meta property=\"og:site_name\" content=\"Coding Dojo\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CodingDojodotco\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-30T14:00:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Brad Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodingDojoDotCo\" \/>\n<meta name=\"twitter:site\" content=\"@CodingDojoDotCo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\"},\"author\":{\"name\":\"Brad Mitchell\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/f0763260736567f77d8107c616816792\"},\"headline\":\"Top 3 Python Data Structures Explained\",\"datePublished\":\"2022-05-30T14:00:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\"},\"wordCount\":1645,\"publisher\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif\",\"keywords\":[\"Python\"],\"articleSection\":[\"All Posts\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\",\"url\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\",\"name\":\"Top 3 Python Data Structures Explained - Coding Dojo\",\"isPartOf\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif\",\"datePublished\":\"2022-05-30T14:00:43+00:00\",\"description\":\"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn't at all. Take a look.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage\",\"url\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif\",\"contentUrl\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif\",\"width\":800,\"height\":536,\"caption\":\"Ferris wheel as a Python data structure\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#website\",\"url\":\"https:\/\/www.codingdojo.com\/blog\/\",\"name\":\"Coding Dojo\",\"description\":\"Coding Bootcamp News, Career Guidance and More\",\"publisher\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codingdojo.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#organization\",\"name\":\"Coding Dojo\",\"url\":\"https:\/\/www.codingdojo.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/Dojo-logo.png\",\"contentUrl\":\"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/Dojo-logo.png\",\"width\":287,\"height\":51,\"caption\":\"Coding Dojo\"},\"image\":{\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/CodingDojodotco\",\"https:\/\/x.com\/CodingDojoDotCo\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/f0763260736567f77d8107c616816792\",\"name\":\"Brad Mitchell\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/image\/ec2fbcd1523bbd2627b9829b755f9a82\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dcc8629d03d0958c0b46f7b63ec616978cba85abe345283ecd4ae3dee76e5146?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dcc8629d03d0958c0b46f7b63ec616978cba85abe345283ecd4ae3dee76e5146?s=96&r=g\",\"caption\":\"Brad Mitchell\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Top 3 Python Data Structures Explained - Coding Dojo","description":"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn't at all. Take a look.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures","og_locale":"en_US","og_type":"article","og_title":"Top 3 Python Data Structures Explained - Coding Dojo","og_description":"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn't at all. Take a look.","og_url":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures","og_site_name":"Coding Dojo","article_publisher":"https:\/\/www.facebook.com\/CodingDojodotco","article_published_time":"2022-05-30T14:00:43+00:00","og_image":[{"width":800,"height":536,"url":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif","type":"image\/gif"}],"author":"Brad Mitchell","twitter_card":"summary_large_image","twitter_creator":"@CodingDojoDotCo","twitter_site":"@CodingDojoDotCo","twitter_misc":{"Written by":"Brad Mitchell","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#article","isPartOf":{"@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures"},"author":{"name":"Brad Mitchell","@id":"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/f0763260736567f77d8107c616816792"},"headline":"Top 3 Python Data Structures Explained","datePublished":"2022-05-30T14:00:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures"},"wordCount":1645,"publisher":{"@id":"https:\/\/www.codingdojo.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage"},"thumbnailUrl":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif","keywords":["Python"],"articleSection":["All Posts"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures","url":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures","name":"Top 3 Python Data Structures Explained - Coding Dojo","isPartOf":{"@id":"https:\/\/www.codingdojo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage"},"image":{"@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage"},"thumbnailUrl":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif","datePublished":"2022-05-30T14:00:43+00:00","description":"Python data structures are the first major hurdle many new coders hit. Fortunately, what may seem complicated isn't at all. Take a look.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codingdojo.com\/blog\/top-python-data-structures"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codingdojo.com\/blog\/top-python-data-structures#primaryimage","url":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif","contentUrl":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/ferrisdata.gif","width":800,"height":536,"caption":"Ferris wheel as a Python data structure"},{"@type":"WebSite","@id":"https:\/\/www.codingdojo.com\/blog\/#website","url":"https:\/\/www.codingdojo.com\/blog\/","name":"Coding Dojo","description":"Coding Bootcamp News, Career Guidance and More","publisher":{"@id":"https:\/\/www.codingdojo.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codingdojo.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codingdojo.com\/blog\/#organization","name":"Coding Dojo","url":"https:\/\/www.codingdojo.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codingdojo.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/Dojo-logo.png","contentUrl":"https:\/\/www.codingdojo.com\/blog\/wp-content\/uploads\/Dojo-logo.png","width":287,"height":51,"caption":"Coding Dojo"},"image":{"@id":"https:\/\/www.codingdojo.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/CodingDojodotco","https:\/\/x.com\/CodingDojoDotCo"]},{"@type":"Person","@id":"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/f0763260736567f77d8107c616816792","name":"Brad Mitchell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codingdojo.com\/blog\/#\/schema\/person\/image\/ec2fbcd1523bbd2627b9829b755f9a82","url":"https:\/\/secure.gravatar.com\/avatar\/dcc8629d03d0958c0b46f7b63ec616978cba85abe345283ecd4ae3dee76e5146?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dcc8629d03d0958c0b46f7b63ec616978cba85abe345283ecd4ae3dee76e5146?s=96&r=g","caption":"Brad Mitchell"}}]}},"authors":[{"term_id":2102,"user_id":0,"is_guest":1,"slug":"bmitchell","display_name":"Brad Mitchell","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/72312b63980f6ac86a1d74e7a54f5de0d489ca9346796f60b8ea6810d65c89af?s=96&r=g","author_category":"","user_url":"","last_name":"Mitchell","first_name":"Brad","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/posts\/11353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/users\/1489"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/comments?post=11353"}],"version-history":[{"count":0,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/posts\/11353\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/media\/11355"}],"wp:attachment":[{"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/media?parent=11353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/categories?post=11353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/tags?post=11353"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.codingdojo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=11353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}