{"id":12899,"date":"2020-11-26T10:25:03","date_gmt":"2020-11-26T18:25:03","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12899"},"modified":"2023-12-01T04:05:01","modified_gmt":"2023-12-01T12:05:01","slug":"iterate-through-dictionary-python","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/","title":{"rendered":"Iterate Through Dictionary Python: Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The items() method, the keys() method, and the values() method return values you can use to iterate through a dictionary in Python. items() returns both the keys and values in a Python dictionary. keys() returns the keys in a dictionary. values() returns the values in a dictionary. You can also use a for loop to iterate through a Python dictionary.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>When you\u2019re working with d<a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary\/\"><\/a>ictionaries, you may want to iterate through the values you have stored.<\/p>\n\n\n\n<p>For instance, say you&#8217;re creating a program for a librarian that shows a specific book\u2019s title, description, author, and other relevant information. You would want to iterate through the dictionary storing that data so you can display it to the user of your profgram.<\/p>\n\n\n\n<p>There are a few ways you can iterate through a dictionary. This tutorial will discuss how to iterate through a dictionary using a for loop, <em>items()<\/em>, and <em>keys()<\/em>. We\u2019ll also explore an example of each of these approaches being used to iterate through a dictionary.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dictionary Refresher<\/h2>\n\n\n\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary\/\">Python dictionaries<\/a> store data in a key-value structure. This means that each value is assigned a key that can be used to reference that particular value.<\/p>\n\n\n\n<p>Here\u2019s an example of a dictionary in Python:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>book = {\n\t'title': 'The Great Gatsby',\n\t'author': 'F. Scott Fitzgerald',\n\t'date_ published': 1925,\n\t'in_stock': True\n}<\/pre><\/div>\n\n\n\n<p>Our dictionary uses colons (<em>:<\/em>) throughout, which separate our keys and values. The words on the left of the colons are the keys, which in this case are <em>title<\/em>, <em>author<\/em>, <em>date_published<\/em>, and <em>in_stock<\/em>. These keys are all formatted as strings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Iterate Through Dictionary<\/h2>\n\n\n\n<p>You can iterate through a Python dictionary using the keys(), items(), and values() methods. keys() returns an iterable list of dictionary keys. items() returns the key-value pairs in a dictionary. values() returns the dictionary values. You can also use a for loop to iterate over a dictionary.<\/p>\n\n\n\n<p>Say wanted to know how many books your library had in stock. You may want to iterate through every dictionary to calculate the total of each book\u2019s quantity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Iterate Using for Loop<\/h3>\n\n\n\n<p>Dictionaries are iterable objects, which means you can iterate through them like any other object. Perhaps the simplest way to iterate through a dictionary is to use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">Python <em>for<\/em> loop<\/a>. This loop allows you to run through each value in the dictionary individually.<\/p>\n\n\n\n<p>Let\u2019s say you are writing a program for a librarian. You want to print out the keys and values of a specific book to the console. Each key-value pair should be printed to the console on a new line. You could accomplish this task using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>book = {\n\t'title': 'The Great Gatsby',\n\t'author': 'F. Scott Fitzgerald',\n\t'date_ published': 1925,\n\t'in_stock': True\n}\n\nfor key in book:\n\tprint(key, book[key])<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>title The Great Gatsby\nauthor F. Scott Fitzgerald\ndate_ published 1925\nin_stock True<\/pre><\/div>\n\n\n\n<p>To start, we declare a <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">Python variable<\/a> called <em>book<\/em> which stores four keys and values. This variable stores a value in the dictionary data type.<\/p>\n\n\n\n<p>Then, we declare a <em>for<\/em> loop that iterates through each value in our dictionary. The for loop prints out both the key and the value associated with that key to the console.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Iterate Using items()<\/h3>\n\n\n\n<p><em>dictionary.items()<\/em> converts each key-value pair in a dictionary into a tuple. Using a for loop and the items() method you can iterate over all of the keys and values in a list.<\/p>\n\n\n\n<p>Let\u2019s say that we still want to iterate through our book dictionary. But we want our values to appear as a list of tuples. We could do so using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for i in book.items():\n\tprint(i)<\/pre><\/div>\n\n\n\n<p>Our code returns a list of tuples: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>('title', 'The Great Gatsby')\n('author', 'F. Scott Fitzgerald')\n('date_ published', 1925)\n('in_stock', True)<\/pre><\/div>\n\n\n\n<p>We define a <em>for<\/em> loop that iterates through our <em>book<\/em> dictionary using <em>items()<\/em>. <em>items()<\/em> converts each key-value pair into a tuple, which we can then access in our for loop. As you can see, each key-value pair was printed to the console as a tuple.<\/p>\n\n\n\n<p>This approach can be useful if you want to convert each value in your dictionary to a tuple while you are iterating.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Iterate Using keys()<\/h3>\n\n\n\n<p>Often, you may only want to iterate through the keys of a dictionary.<\/p>\n\n\n\n<p>The librarian with whom we are working has asked us to compile a list of the information the library stores on each book. In our terms, this means the librarian wants a list of the keys stored in our dictionary.<\/p>\n\n\n\n<p>We could use the <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\">Python dictionary keys() method<\/a> to get a list of keys and print them out to the console. Here\u2019s the code we would use to accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for k in book.keys():\n\tprint(k)<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>title\nauthor\ndate_published\nin_stock<\/pre><\/div>\n\n\n\n<p>In our code, we define a <em>for<\/em> loop that uses <em>keys()<\/em> to find the keys in our dictionary. Then, the loop iterates through each of those keys and prints them to the console. As you can see, our code returned the names of our four keys.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Iterate Using values()<\/h3>\n\n\n\n<p>The <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">Python dictionary <em>values() <\/em>method<\/a> can be used to iterate through a dictionary\u2019s values in Python. This method works in the same way as <em>keys()<\/em>, but instead returns the values in a dictionary.<\/p>\n\n\n\n<p>Our librarian wants us to print out the values of each item in the <em>book<\/em> dictionary entry for The Great Gatsby to the console. We could do so using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for v in book.values():\n\tprint(v)<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The Great Gatsby\nF. Scott Fitzgerald\n1925\nTrue<\/pre><\/div>\n\n\n\n<p><strong>View the Repl.it from this tutorial:<\/strong><\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/repl.it\/@careerkarma\/Python-Iterate-Through-Dictionary?lite=true\" width=\"100%\" height=\"400px\" frameborder=\"0\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>To iterate through a dictionary in Python, there are four main approaches you can use: create a for loop, use <em>items()<\/em> to iterate through a dictionary\u2019s key-value pairs, use <em>keys()<\/em> to iterate through a dictionary\u2019s keys, or use <em>values()<\/em> to iterate through a dictionary\u2019s values.<\/p>\n\n\n\n<p>This tutorial discussed how to use these four approaches to iterate through a dictionary in Python. We also explored an example of each of these methods in action. You\u2019re now ready to start iterating through Python dictionaries like a professional!<\/p>\n\n\n\n<p>For information on top Python courses, training programs, and learning resources, check out our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The items() method, the keys() method, and the values() method return values you can use to iterate through a dictionary in Python. items() returns both the keys and values in a Python dictionary. keys() returns the keys in a dictionary. values() returns the values in a dictionary. You can also use a for loop to&hellip;","protected":false},"author":240,"featured_media":12900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12899","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>Iterate Through Dictionary Python: Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.\" \/>\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\/iterate-through-dictionary-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Iterate Through Dictionary Python: Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\" \/>\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-11-26T18:25:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:05:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\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\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Iterate Through Dictionary Python: Step-By-Step Guide\",\"datePublished\":\"2020-11-26T18:25:03+00:00\",\"dateModified\":\"2023-12-01T12:05:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\"},\"wordCount\":961,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\",\"name\":\"Iterate Through Dictionary Python: Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg\",\"datePublished\":\"2020-11-26T18:25:03+00:00\",\"dateModified\":\"2023-12-01T12:05:01+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg\",\"width\":1000,\"height\":750},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#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\":\"Iterate Through Dictionary Python: Step-By-Step Guide\"}]},{\"@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\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Iterate Through Dictionary Python: Step-By-Step Guide | Career Karma","description":"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.","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\/iterate-through-dictionary-python\/","og_locale":"en_US","og_type":"article","og_title":"Iterate Through Dictionary Python: Step-By-Step Guide","og_description":"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-26T18:25:03+00:00","article_modified_time":"2023-12-01T12:05:01+00:00","og_image":[{"width":1000,"height":750,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Iterate Through Dictionary Python: Step-By-Step Guide","datePublished":"2020-11-26T18:25:03+00:00","dateModified":"2023-12-01T12:05:01+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/"},"wordCount":961,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/","url":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/","name":"Iterate Through Dictionary Python: Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg","datePublished":"2020-11-26T18:25:03+00:00","dateModified":"2023-12-01T12:05:01+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Iterating through a dictionary is a common operation used by coders in Python. Learn how to iterate through a dictionary using for loops, items(), keys(), and values() on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-using-macbook-209151.jpg","width":1000,"height":750},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/iterate-through-dictionary-python\/#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":"Iterate Through Dictionary Python: Step-By-Step Guide"}]},{"@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\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12899","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\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12899"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12899\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12900"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}