{"id":51017,"date":"2020-07-22T16:15:00","date_gmt":"2020-07-22T16:15:00","guid":{"rendered":"https:\/\/icrowdnewswire.com\/?p=2667087"},"modified":"2020-07-22T16:15:00","modified_gmt":"2020-07-22T16:15:00","slug":"when-to-use-lists-vs-dictionaries-in-python","status":"publish","type":"post","link":"http:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/","title":{"rendered":"When to use lists vs dictionaries in Python"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"233\" height=\"24\" src=\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\" class=\"webfeedsFeaturedVisual wp-post-image\" alt=\"\" style=\"display: block; margin-bottom: 5px; clear:both;max-width: 100%;\" link_thumbnail=\"\" \/><\/p>\n<p>Want to seriously level up your coding game? Check out&nbsp;<a href=\"https:\/\/andauth.co\/AnKd7f\" target=\"_blank\" rel=\"noopener noreferrer\" data-vars-outbound-link=\"https:\/\/andauth.co\/AnKd7f\">the Complete 2020 Python Programming Certification Bundle<\/a>, currently&nbsp;<strong>97% off<\/strong>&nbsp;for Android Authority readers.<\/p>\n<p><em>Psst!&nbsp;<\/em>Android Authority readers get&nbsp;<strong>98%<\/strong>&nbsp;off the&nbsp;<a href=\"https:\/\/andauth.co\/XF2H26\" target=\"_blank\" rel=\"noopener noreferrer\" data-vars-outbound-link=\"https:\/\/andauth.co\/XF2H26\">Complete 2020 Python Programming Certification Bundle<\/a>.&nbsp;<a href=\"https:\/\/andauth.co\/XF2H26\" target=\"_blank\" rel=\"noopener noreferrer\" data-vars-outbound-link=\"https:\/\/andauth.co\/XF2H26\">Check it out.<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn57.androidauthority.net\/wp-content\/uploads\/2019\/08\/Programming-Code-Out-of-Focus-Headphones-1200x675.jpg\" alt=\"how to create a list in Python\" width=\"634\" height=\"357\" \/><\/p>\n<p>One of the most fundamental and simple skills to learn as a new coder, is how to create a list in Python. But when you also have the option to create dictionaries &ndash; which are potentially more powerful &ndash; the question becomes why you should need this skill!<\/p>\n<p>In this post, we&rsquo;ll break down how to create a list in Python and when you should choose one over a dictionary.<\/p>\n<h2>How to create a list in Python and what they are for<\/h2>\n<p>In programming, a list is a variable that contains lots of&nbsp;<strong>other&nbsp;<\/strong>variables. These are added to the list in a sequential order that can then be referenced at any time. In Python, a list can contain multiple data types: strings, integers, booleans, and more.<\/p>\n<p>Thus, the types of lists you build in Python will often be similar to the lists you create in real life: lists of names, lists of phone numbers, lists of places&hellip; etc.<\/p>\n<p>Learning how to create a list in Python is extremely easy. Simply define a variable using square brackets, then separate the elements in the list by commas:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">JAVA<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_31861\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_31861\" class=\"hljs java\">toDoList = [<span class=\"hljs-string\">\"Take out trash\"<\/span>, <span class=\"hljs-string\">\"Wish Dad happy birthday\"<\/span>, <span class=\"hljs-string\">\"Answer emails\"<\/span>]<\/pre>\n<p>We can then print the items in this list to the screen:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">PYTHON<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_28971\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_28971\" class=\"hljs python\"><span class=\"hljs-keyword\">for<\/span> x <span class=\"hljs-keyword\">in<\/span> range(<span class=\"hljs-number\">0<\/span>, len(toDoList)):\r\n\r\n&nbsp;&nbsp; print(toDoList[x])<\/pre>\n<p>Or, we can print individual items from that list:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">PHP<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_51021\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_51021\" class=\"hljs php\"><span class=\"hljs-keyword\">print<\/span>(toDoList[<span class=\"hljs-number\">3<\/span>])<\/pre>\n<p>Or a range:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">CSS<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_14381\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_14381\" class=\"hljs css\"><span class=\"hljs-tag\">toDoList<\/span><span class=\"hljs-attr_selector\">[1:2]<\/span><\/pre>\n<p>(Remember, the second digit is not inclusive, and the first position on any list is indexed as &ldquo;0.&rdquo;)<\/p>\n<p>At any point, we can now add items to the list, or insert them at specific locations in the list. For instance:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">JAVA<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_5481\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_5481\" class=\"hljs java\">toDoList.append(<span class=\"hljs-string\">\"Defrost chicken\"<\/span>)<\/pre>\n<p>This will add the item to the end of the list.<\/p>\n<p>If you want to know how to create a list in Python that&rsquo;s empty, that&rsquo;s also extremely straightforward:<\/p>\n<div class=\"aa_hljs_description clearfix\"><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_66601\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_66601\" class=\"hljs\">toDoList = []<\/pre>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">JAVA<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_8811\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_8811\" class=\"hljs java\">toDoList.insert(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-string\">\"Send invoice\"<\/span>)<\/pre>\n<p>It&rsquo;s now possible to use append and insert to populate the list programmatically. If we want to remove items, we use:<\/p>\n<div class=\"aa_hljs_description clearfix\"><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_58121\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_58121\" class=\"hljs\">toDoList.remove(3)<\/pre>\n<p>And that is how to create a list in Python!<\/p>\n<p>If you want to know more about this, check out the following post:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.androidauthority.com\/how-to-add-to-a-list-in-python-1134815\/\">How to use lists in Python<\/a><\/li>\n<\/ul>\n<h2>How to create a dictionary in Python<\/h2>\n<p>A dictionary is similar to a list, but with a key difference. That&rsquo;s a pun, by the way.<\/p>\n<p>The difference is that instead of being a consecutive list that uses an index, a dictionary is more like a database that stores values with a &ldquo;key&rdquo; to use as the reference.<\/p>\n<p>We create dictionaries in a similar manner to lists, but using curly brackets and including bothkey and the value itself. For example, we might store a series of phone numbers like this:<\/p>\n<div class=\"post_content_intcont center\">\n<div id=\"custom_html-5\" class=\"widget_text widget clearfix\">\n<div class=\"textwidget custom-html-widget\">\n<div id=\"mob-box-ad-a\">&nbsp;<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">JAVA<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_33571\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_33571\" class=\"hljs java\">phoneBook={<span class=\"hljs-string\">\"Jeff\"<\/span> : <span class=\"hljs-number\">7701489772<\/span>,<span class=\"hljs-string\">\"Bill\"<\/span> : <span class=\"hljs-number\">7378999911<\/span>, <span class=\"hljs-string\">\"Nancy\"<\/span> : <span class=\"hljs-number\">7711289354<\/span>}<\/pre>\n<p>We could then pull out a specific person&rsquo;s number by using their name:<\/p>\n<div class=\"aa_hljs_description clearfix\"><span class=\"aa_lang_name\">PHP<\/span><a class=\"aa_clipboard\" data-clipboard-target=\"#hl_66711\" data-vars-outbound-link=\"javascript:void(null)\">SELECT ALL<\/a><\/div>\n<pre id=\"hl_66711\" class=\"hljs php\"><span class=\"hljs-keyword\">print<\/span>(phoneBook[<span class=\"hljs-string\">\"Jeff\"<\/span>])<\/pre>\n<p>For more on using dictionaries, check out our detailed post:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.androidauthority.com\/how-to-add-to-a-dictionary-python-1136937\/\">How to use dictionaries in Python<\/a><\/li>\n<\/ul>\n<h2>When to use lists vs dictionaries<\/h2>\n<p>So, now you know how to create a list in Python and how to create a dictionary! The question that remains is: when do you use each? What is the benefit of one over the other?<\/p>\n<p>Let&rsquo;s start by looking at the obvious limitation of using lists. When we use a list in Python, we create a challenge for ourselves because the list index will change each time we add new elements. Thus it is very difficult to maintain any kind of order.<\/p>\n<p>For instance, if we wanted to store phone numbers as a list but keep track of&nbsp;<em>whose&nbsp;<\/em>number each one was, the only way we could do that would be either to store two values consecutively (the name followed by the number) or to create a second list where the positions of each person were kept the same as their respective numbers.<\/p>\n<p><strong>Read also:&nbsp;<\/strong><a href=\"https:\/\/www.androidauthority.com\/how-to-round-in-python-1134475\/\">How to round in Python<\/a><\/p>\n<p>While both these options could work, they would be convoluted at best and it would be easy to get them mixed up.<\/p>\n<p>What&rsquo;s more, is that dictionaries are&nbsp;<em>also&nbsp;<\/em>much faster for looking up data as compared with lists!<\/p>\n<p>But is a dictionary always superior? Why learn how to create a list in Python at all?<\/p>\n<p>The obvious answer here, is that a list maintains order. This is important if ever we want to give a list an order. And there are many situations where this is useful: such as when assigning relative importance, for example when creating a to-do list, a sequence of levels etc.<\/p>\n<p>Lists are also slightly simpler to use when you&rsquo;re in a hurry if you need to store just a few items. Likewise, although dictionaries are faster, they also use up more memory as compared with a list.<\/p>\n<p>As you can see then, choosing the right format in Python is a matter of knowing your objectives. Now you know how to create a list in Python, and you know when you should!<\/p>\n<hr \/>\n<p>Want to take your Python knowledge further? We recommend&nbsp;<em>Coding with Python: Training for Aspiring Developers<\/em>, which you can nab for just $49.99, which is an absolute steal as the course is valued around $700. Check out our guide to the&nbsp;<a href=\"https:\/\/www.androidauthority.com\/best-online-python-courses-1115430\/\">best online Python courses for more<\/a>!<\/p>\n<p class=\"tags\">\n<div><strong>See Campaign: <\/strong><a href=\"https:\/\/andauth.co\/AnKd7f\" target=\"_blank\">https:\/\/andauth.co\/AnKd7f<\/a><br \/><b>Contact Information:<\/b><br \/>Adam Sinicki<\/p>\n<p><b>Tags:<\/b><br \/><a href=\"\"><\/a>, <a href=\"https:\/\/icrowdnewswire.com\/category\/news-category\/wire\/\" rel=\"category tag\">Wire<\/a>, <a href=\"https:\/\/icrowdnewswire.com\/category\/global-regions\/united-states\/\" rel=\"category tag\">United States<\/a>, <a href=\"https:\/\/icrowdnewswire.com\/category\/language\/english\/\" rel=\"category tag\">English<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\" alt=\"image\" width=\"400\" height=\"300\" class=\"cwdfimg\" \/><\/div>\n<div>\n<h3>Contact Information:<\/h3>\n<p>Adam Sinicki<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"233\" height=\"24\" src=\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\" alt=\"\">Want to seriously level up your coding game? Check out&nbsp;the Complete 2020 Python Programming Certification Bundle, currently&nbsp;97% off&nbsp;for Android Authority readers. Psst!&nbsp;Android Authority readers get&nbsp;98%&nbsp;off the&nbsp;Complete 2020 Python Programming Certification Bundle.&nbsp;Check it out. One of the most fundamental and simple skills to learn as a new coder, is how to create a list in Python. &hellip; <a href=\"https:\/\/icrowdnewswire.com\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\">Continue reading <span>When to use lists vs dictionaries in Python<\/span><\/a> <a href=\"http:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,22,54],"tags":[],"class_list":["post-51017","post","type-post","status-publish","format-standard","hentry","category-english","category-united-states","category-wire"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>When to use lists vs dictionaries in Python - Business<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"When to use lists vs dictionaries in Python - Business\" \/>\n<meta property=\"og:description\" content=\"Want to seriously level up your coding game? Check out&nbsp;the Complete 2020 Python Programming Certification Bundle, currently&nbsp;97% off&nbsp;for Android Authority readers. Psst!&nbsp;Android Authority readers get&nbsp;98%&nbsp;off the&nbsp;Complete 2020 Python Programming Certification Bundle.&nbsp;Check it out. One of the most fundamental and simple skills to learn as a new coder, is how to create a list in Python. &hellip; Continue reading When to use lists vs dictionaries in Python Continue Reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Business\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-22T16:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\" \/>\n<meta name=\"author\" content=\"Bilal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bilal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\",\"url\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\",\"name\":\"When to use lists vs dictionaries in Python - Business\",\"isPartOf\":{\"@id\":\"https:\/\/ipsnews.net\/business\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\",\"datePublished\":\"2020-07-22T16:15:00+00:00\",\"author\":{\"@id\":\"https:\/\/ipsnews.net\/business\/#\/schema\/person\/70b05bacee6cf8a877350412fae25e20\"},\"breadcrumb\":{\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage\",\"url\":\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\",\"contentUrl\":\"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ipsnews.net\/business\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"When to use lists vs dictionaries in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ipsnews.net\/business\/#website\",\"url\":\"https:\/\/ipsnews.net\/business\/\",\"name\":\"Business\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ipsnews.net\/business\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ipsnews.net\/business\/#\/schema\/person\/70b05bacee6cf8a877350412fae25e20\",\"name\":\"Bilal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ipsnews.net\/business\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/01d05f3f41cc0f9ca88d2011a983bb3f2e83e3e92e3532188bf201df38d2aea8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/01d05f3f41cc0f9ca88d2011a983bb3f2e83e3e92e3532188bf201df38d2aea8?s=96&d=mm&r=g\",\"caption\":\"Bilal\"},\"sameAs\":[\"https:\/\/icrowdnewswire.com\/fc\"],\"url\":\"http:\/\/ipsnews.net\/business\/author\/bilal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"When to use lists vs dictionaries in Python - Business","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:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/","og_locale":"en_US","og_type":"article","og_title":"When to use lists vs dictionaries in Python - Business","og_description":"Want to seriously level up your coding game? Check out&nbsp;the Complete 2020 Python Programming Certification Bundle, currently&nbsp;97% off&nbsp;for Android Authority readers. Psst!&nbsp;Android Authority readers get&nbsp;98%&nbsp;off the&nbsp;Complete 2020 Python Programming Certification Bundle.&nbsp;Check it out. One of the most fundamental and simple skills to learn as a new coder, is how to create a list in Python. &hellip; Continue reading When to use lists vs dictionaries in Python Continue Reading &rarr;","og_url":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/","og_site_name":"Business","article_published_time":"2020-07-22T16:15:00+00:00","og_image":[{"url":"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png","type":"","width":"","height":""}],"author":"Bilal","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bilal","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/","url":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/","name":"When to use lists vs dictionaries in Python - Business","isPartOf":{"@id":"https:\/\/ipsnews.net\/business\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage"},"image":{"@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png","datePublished":"2020-07-22T16:15:00+00:00","author":{"@id":"https:\/\/ipsnews.net\/business\/#\/schema\/person\/70b05bacee6cf8a877350412fae25e20"},"breadcrumb":{"@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#primaryimage","url":"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png","contentUrl":"https:\/\/icrowdnewswire.com\/wp-content\/uploads\/2020\/06\/4001-logo.png"},{"@type":"BreadcrumbList","@id":"https:\/\/ipsnews.net\/business\/2020\/07\/22\/when-to-use-lists-vs-dictionaries-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ipsnews.net\/business\/"},{"@type":"ListItem","position":2,"name":"When to use lists vs dictionaries in Python"}]},{"@type":"WebSite","@id":"https:\/\/ipsnews.net\/business\/#website","url":"https:\/\/ipsnews.net\/business\/","name":"Business","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ipsnews.net\/business\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ipsnews.net\/business\/#\/schema\/person\/70b05bacee6cf8a877350412fae25e20","name":"Bilal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ipsnews.net\/business\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/01d05f3f41cc0f9ca88d2011a983bb3f2e83e3e92e3532188bf201df38d2aea8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/01d05f3f41cc0f9ca88d2011a983bb3f2e83e3e92e3532188bf201df38d2aea8?s=96&d=mm&r=g","caption":"Bilal"},"sameAs":["https:\/\/icrowdnewswire.com\/fc"],"url":"http:\/\/ipsnews.net\/business\/author\/bilal\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/posts\/51017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/comments?post=51017"}],"version-history":[{"count":1,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/posts\/51017\/revisions"}],"predecessor-version":[{"id":51018,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/posts\/51017\/revisions\/51018"}],"wp:attachment":[{"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/media?parent=51017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/categories?post=51017"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ipsnews.net\/business\/wp-json\/wp\/v2\/tags?post=51017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}