{"id":23673,"date":"2020-10-05T06:05:27","date_gmt":"2020-10-05T13:05:27","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=23673"},"modified":"2021-02-25T19:08:23","modified_gmt":"2021-02-26T03:08:23","slug":"python-data-structures","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-data-structures\/","title":{"rendered":"Python Data Structures"},"content":{"rendered":"\n<p>Data structures are essential in programming. They are used to organize, store, and manage data in a way that is efficient to access and modify.&nbsp;<br><\/p>\n\n\n\n<p>Imagine doing your weekly load of laundry. Ideally, you separate socks, tees, trousers, and delicates in separate drawers for easy access in the morning before heading out. You are getting ready with a data structure. Now, imagine throwing all of those belongings either inside of one single drawer or multiple drawers without organization. How long do you think it will take for you to get decent for work or a night out? This is getting ready without a data structure.<br><\/p>\n\n\n\n<p>In this article, we dive into the built-in data structures Python has to offer.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Built-in Data Structures in Python<\/h2>\n\n\n\n<p>Built-in data structures in Python include lists, dictionaries, tuples, and sets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Lists<\/h3>\n\n\n\n<p>Lists are mutable (capable of alterations) data structures that can have dissimilar elements or parts. In other words, a single list can contain various different data types.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string', 300, (2, 4), 'that previous data type was a tuple']\n<\/pre><\/div>\n\n\n\n<p>The list data structure has 11 methods used to add, remove, or manipulate the list itself.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Adding Elements into a List<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>append(): The append() method adds a single item onto a list<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string, next is tupel', (2, 1), 3]\n \n list.append(500)\n print(list)\n # prints ['string, next is tupel', (2, 1), 3, 500]\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>extend(): The extend() method appends the list by all items from the iterable. It differs from append() in the following way.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>list = ['string, next is tupel', (2, 1), 3]\n \n list.append((8, 9))\n print(list)\n # prints ['string, next is tupel', (2, 1), 3, (8, 9)]\n # Notice that append() leave (8, 9) as a tuple\n \n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>list = ['string, next is tupel', (2, 1), 3]\n \n list.extend((8, 9))\n print(list)\n # prints ['string, next is tupel', (2, 1), 3, 8, 9]\n # Notice that extend() did not leave (8, 9) as a tuple\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>insert(): The insert() method inserts an item at a given position or index. The first argument being the index of the element that needs to be inserted, the second argument being the element itself.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string, next is tupel', (2, 1), 3]\n \n list.insert(0, 700)\n print(list)\n # prints [700, 'string, next is tupel', (2, 1), 3]\n# inserted 700 in the 0 index\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Removing Elements from a List<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>remove(): The remove() method removes the first item on the list that contains the value it was given.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string, next is tupel', (2, 1), 3, 8, 3]\n \n list.remove(3)\n print(list)\n # prints ['string, next is tupel', (2, 1), 8, 3]\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>pop(): The pop() method removes a value in the position it was given, however if no index is given, it removes the last item.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string, next is tupel', (2, 1), 3]\n \n list.pop(0)\n print(list)\n # prints [(2, 1), 3]\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = ['string, next is tupel', (2, 1), 3]\n \n list.pop()\n print(list)\n # prints ['string, next is tupel', (2, 1)]\n \n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>clear(): The clear() method takes no arguments. It removes all items from the list.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>  list = ['string, next is tupel', (2, 1), 3]\n \n list.clear()\n print(list)\n # prints []\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Other List Methods<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>index(): The index() method returns the index of the value given.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> \n list = [8, 20, 1, 9, 2, 3, 937, 0]\n \n print(list.index(9))\n # prints 3\n \n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>count(): The count() method counts how many times a value occurs in a list.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = [8, 20, 1, 8, 2, 8, 937, 8]\n \n print(list.count(8))\n # prints 4\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>sort(): The sort() method can be used with or without arguments and can be used for sorting customization.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = [8, 20, 1, 9, 2, 3, 937, 0]\n \n list.sort()\n print(list)\n # prints [0, 1, 2, 3, 8, 9, 20, 937]\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = [8, 20, 1, 9, 2, 3, 937, 0]\n \n list.sort(reverse= True)\n print(list)\n # prints [937, 20, 9, 8, 3, 2, 1, 0]\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>reverse(): The reverse method reverses the elements of the list in place, much like the sort method above that takes a customized sorting argument.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = [8, 20, 1, 9, 2, 3, 937, 0]\n \n list.reverse()\n print(list)\n # prints [0, 937, 3, 2, 9, 1, 20, 8]\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>copy(): The copy() method simply returns a copy of a list.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> list = [8, 20, 1, 9, 2, 3, 937, 0]\n \n list.copy()\n print(list)\n # prints [8, 20, 1, 9, 2, 3, 937, 0]\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Tuples<\/h3>\n\n\n\n<p>Tuples are data held in parenthesis. Unlike lists, they are not mutable (meaning it is not capable of alterations), and they are faster than lists. Because they are immutable, we can also use them as keys in dictionaries. Tuples can also be used for whenever we want to return multiple results from a function.&nbsp;<br><\/p>\n\n\n\n<p>We can add data into a tuple by using concatenation.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> tuple = (1, 2, 3)\n print(tuple)\n # prints (1, 2, 3)\n \n tuple = tuple + (4, 5, 6)\n print(tuple)\n # prints (1, 2, 3, 4, 5, 6)\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Dictionaries<\/h3>\n\n\n\n<p>Dictionaries are data structures that hold key value pairs like objects in JavaScript. Like lists, these data structures are mutable, meaning we can change its data.<br><\/p>\n\n\n\n<p>An example of a key value pair is the characteristics of a person and the description of those characteristics. Name, age, height, and weight can all be keys. Josh, 33, 5\u201910, 180 lbs, can all be values for those keys.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n<\/pre><\/div>\n\n\n\n<p>Because dictionaries are mutable, we can change \u2018Josh\u2019 to another name.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre> \n dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \n \n \n dict['name'] = 'Patrick'\n print(dict)\n # prints {'name': 'Patrick', 'age': 33, 'height': &quot;5'10&quot;, 'weight': '180    lbs'}\n<\/pre><\/div>\n\n\n\n<p>We can add values by creating new key value pairs.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \n \ndict['location'] = 'San Francisco'\nprint(dict)\n# prints {'name': 'Josh', 'age': 33, 'height': &quot;5'10&quot;, 'weight': '180 lbs', 'location': 'San Francisco'}\n<\/pre><\/div>\n\n\n\n<p>We can also delete key value pairs in a dictionary by utilizing the del keyword, pop(), or popitem() methods. Note that with dictionaries pop() must&nbsp; take an argument, so we need popitem() to remove from the last key value pair from a dictionary.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \n \ndel dict['name']\nprint(dict)\n# prints {'age': 33, 'height': &quot;5'10&quot;, 'weight': '180 lbs'}\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \ndict.pop('name')\nprint(dict)\n# prints {'age': 33, 'height': &quot;5'10&quot;, 'weight': '180 lbs'}\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \ndict.popitem()\nprint(dict)\n# prints {'name': 'Josh', 'age': 33, 'height': &quot;5'10&quot;}\n<\/pre><\/div>\n\n\n\n<p>We can also print solely the keys or solely the values of a dictionary.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \nprint(dict.keys())\n# prints dict_keys(['name', 'age', 'height', 'weight'])\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \nprint(dict.values())\n# prints dict_values(['Josh', 33, &quot;5'10&quot;, '180 lbs'])\n<\/pre><\/div>\n\n\n\n<p>To print as key value pairs, we can use the items() method.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict = {'name': 'Josh', \n        'age': 33, \n        'height': &quot;5'10&quot;, \n        'weight': '180 lbs' }\n \nprint(dict.items())\n# prints dict_items([('name', 'Josh'), ('age', 33), ('height', &quot;5'10&quot;), ('weight', '180 lbs')])\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Sets<\/h3>\n\n\n\n<p>Sets are mutable, unordered collections of unique elements, meaning they do not include duplicate elements. Sets look like dictionaries in that they both hold data in curly brackets, but unlike dictionaries, sets do not have key value pairs.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nprint(set)\n# prints {1, 2, 3, 4}\n<\/pre><\/div>\n\n\n\n<p>We can add elements to the set by utilizing the add() method.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nset.add(5)\nprint(set)\n# print {1, 2, 3, 4, 5}\n<\/pre><\/div>\n\n\n\n<p>There are four other methods available to us when using sets, union(), intersection(), difference(), and symmetric_difference().<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>union(): The union() method unionizes two difference sets, taking the commonalities of both and producing it as a single set with no duplicates.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nset.add(5)\nprint(set)\n# prints {1, 2, 3, 4, 5}\n \nanotherSet = {3, 3, 4, 4, 5, 5, 6}\nprint(set.union(anotherSet))\n# prints {1, 2, 3, 4, 5, 6}\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>intersection(): The intersection method finds the common elements in both sets.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nset.add(5)\nprint(set)\n# prints {1, 2, 3, 4, 5}\n \nanotherSet = {3, 3, 4, 4, 5, 5, 6}\nprint(set.intersection(anotherSet))\n# prints {3, 4, 5}\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>difference(): The difference method does the opposite of the intersection method in that it takes out all of the commonalities and prints out what is left from the first set.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nset.add(5)\nprint(set)\n# prints {1, 2, 3, 4, 5}\n \nanotherSet = {3, 3, 4, 4, 5, 5, 6}\nprint(set.difference(anotherSet))\n# prints {1, 2}\n<\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>symmetric_difference(): The symmetric_difference() method is the same as the difference method except we get the difference of both of the sets in the output.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>set = {1, 2, 2, 2, 3, 3, 4, 4}\n \nset.add(5)\nprint(set)\n# prints {1, 2, 3, 4, 5}\n \nanotherSet = {3, 3, 4, 4, 5, 5, 6}\nprint(set.symmetric_difference(anotherSet))\n# prints {1, 2, 6}\n<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"Data structures are essential in programming. They are used to organize, store, and manage data in a way that is efficient to access and modify.&nbsp; Imagine doing your weekly load of laundry. Ideally, you separate socks, tees, trousers, and delicates in separate drawers for easy access in the morning before heading out. You are getting&hellip;","protected":false},"author":91,"featured_media":23674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-23673","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Data Structures: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Learn about the different types of data structures in Python and why they are important\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Data Structures\" \/>\n<meta property=\"og:description\" content=\"Learn about the different types of data structures in Python and why they are important\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-05T13:05:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-26T03:08:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kelly M.\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/misskellymore\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kelly M.\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\"},\"author\":{\"name\":\"Kelly M.\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb\"},\"headline\":\"Python Data Structures\",\"datePublished\":\"2020-10-05T13:05:27+00:00\",\"dateModified\":\"2021-02-26T03:08:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\"},\"wordCount\":774,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\",\"name\":\"Python Data Structures: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg\",\"datePublished\":\"2020-10-05T13:05:27+00:00\",\"dateModified\":\"2021-02-26T03:08:23+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb\"},\"description\":\"Learn about the different types of data structures in Python and why they are important\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-data-structures\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-data-structures\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Data Structures\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb\",\"name\":\"Kelly M.\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/kelly-moreira-150x150.jpeg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/kelly-moreira-150x150.jpeg\",\"caption\":\"Kelly M.\"},\"description\":\"Kelly is a technical writer at Career Karma, where she writes tutorials on a variety of topics. She attended the University of Central Florida, earning a BS in Business Administration. Shortly after, she attended Lambda School, specializing in full stack web development and computer science. Before joining Career Karma in September 2020, Kelly worked as a Developer Advocate at Dwolla and as a team lead at Lambda School. Her technical writing can be found on Codecademy, gitConnected, and JavaScript in Plain English.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/kemore\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/misskellymore\"],\"url\":\"https:\/\/careerkarma.com\/blog\/author\/kelly-m\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Data Structures: A Complete Guide | Career Karma","description":"Learn about the different types of data structures in Python and why they are important","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:\/\/careerkarma.com\/blog\/python-data-structures\/","og_locale":"en_US","og_type":"article","og_title":"Python Data Structures","og_description":"Learn about the different types of data structures in Python and why they are important","og_url":"https:\/\/careerkarma.com\/blog\/python-data-structures\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-10-05T13:05:27+00:00","article_modified_time":"2021-02-26T03:08:23+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg","type":"image\/jpeg"}],"author":"Kelly M.","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/misskellymore","twitter_site":"@career_karma","twitter_misc":{"Written by":"Kelly M.","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/"},"author":{"name":"Kelly M.","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb"},"headline":"Python Data Structures","datePublished":"2020-10-05T13:05:27+00:00","dateModified":"2021-02-26T03:08:23+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/"},"wordCount":774,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-data-structures\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/","url":"https:\/\/careerkarma.com\/blog\/python-data-structures\/","name":"Python Data Structures: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg","datePublished":"2020-10-05T13:05:27+00:00","dateModified":"2021-02-26T03:08:23+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb"},"description":"Learn about the different types of data structures in Python and why they are important","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-data-structures\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/10\/eduard-militaru-i3B5vigcjkk-unsplash.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-data-structures\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python Data Structures"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/1cc6a89c78a56b632b6032b3b040c4fb","name":"Kelly M.","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/kelly-moreira-150x150.jpeg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/kelly-moreira-150x150.jpeg","caption":"Kelly M."},"description":"Kelly is a technical writer at Career Karma, where she writes tutorials on a variety of topics. She attended the University of Central Florida, earning a BS in Business Administration. Shortly after, she attended Lambda School, specializing in full stack web development and computer science. Before joining Career Karma in September 2020, Kelly worked as a Developer Advocate at Dwolla and as a team lead at Lambda School. Her technical writing can be found on Codecademy, gitConnected, and JavaScript in Plain English.","sameAs":["https:\/\/www.linkedin.com\/in\/kemore\/","https:\/\/x.com\/https:\/\/twitter.com\/misskellymore"],"url":"https:\/\/careerkarma.com\/blog\/author\/kelly-m\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/23673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=23673"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/23673\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/23674"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=23673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=23673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=23673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}