{"id":22321,"date":"2020-09-08T02:15:50","date_gmt":"2020-09-08T09:15:50","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22321"},"modified":"2023-12-01T03:59:31","modified_gmt":"2023-12-01T11:59:31","slug":"python-print-dictionary","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/","title":{"rendered":"Python: How to Print a Dictionary"},"content":{"rendered":"\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">Dictionaries store data in key-value pairs<\/a>. This means each value in a dictionary is associated with a key. This key acts as a reference point.<br><\/p>\n\n\n\n<p>If you want to view the contents of a dictionary on the console, there are a few approaches you can take. You can print out a dictionary directly, or print out the key-value pairs individually.<br><\/p>\n\n\n\n<p>In this guide, we discuss how to print a dictionary in Python. We walk through a few examples to help you figure out how to print a dictionary in your own code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python: Print Dictionary Using a for Loop<\/h2>\n\n\n\n<p>We\u2019re going to build a program that prints out the contents of a dictionary for a baker to read. This dictionary contains the names of ingredients and the quantities of those ingredients that are needed to bake a batch of scones.<br><\/p>\n\n\n\n<p>Let\u2019s create a dictionary with information about our recipe:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>scone = {\n\t   &quot;self-raising flour&quot;: &quot;350g&quot;,\n\t   &quot;baking powder&quot;: &quot;1 tbsp&quot;,\n\t   &quot;butter&quot;: &quot;85g&quot;,\n\t   &quot;caster sugar&quot;: &quot;3 tbsp&quot;,\n\t   &quot;milk&quot;: &quot;175ml&quot;,\n\t   &quot;egg&quot;: &quot;1 whole&quot;\n}<\/pre><\/div>\n\n\n\n<p>Our dictionary contains six <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">keys and values<\/a>. Each key represents the name of an ingredient and each value tells us the quantity of that ingredient needed to cook a batch of scones.<br><\/p>\n\n\n\n<p>Next, we use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> to print the contents of this dictionary. We can do this using the <code>items()<\/code> method like this:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for key, value in scone.items():\n\t    print(value, key)<\/pre><\/div>\n\n\n\n<p>Let\u2019s run our code and see what happens:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>350g self-raising flour\n1 tbsp baking powder\n85g butter\n3 tbsp caster sugar\n175ml milk\n1 whole egg<\/pre><\/div>\n\n\n\n<p>Our code successfully prints out all of the keys and values in our dictionary. The <code>items()<\/code> method returns two lists: all the keys in a dictionary and all the values in a dictionary. Every time we iterate over the method, we can access a new key-value pair.<br><\/p>\n\n\n\n<p>In the first iteration, \u201cvalue\u201d is \u201c350g\u201d and \u201ckey\u201d is \u201cself-raising flour\u201d. Our for loop continues to iterate until every key-value pair has been printed to the console.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python: Print Dictionary Using the json Module<\/h2>\n\n\n\n<p>In our last example, we printed out a dictionary to the console manually using a for loop. This is ideal for the last use case because we wanted the list of ingredients to be readable by a baker.<br><\/p>\n\n\n\n<p>The <a href=\"https:\/\/careerkarma.com\/blog\/python-json\/\">json module<\/a> lets you work with dictionaries. The json.dumps method makes a dictionary easily readable by developers. This is ideal for developers who want to see the values in a dictionary on the console.<br><\/p>\n\n\n\n<p>We\u2019re going to tweak our program from earlier to use the json module to print a dictionary.<br><\/p>\n\n\n\n<p>To start, import the json module so that we can work with it in our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import json<\/pre><\/div>\n\n\n\n<p>Next, let\u2019s define our dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>scone = {\n\t   &quot;self-raising flour&quot;: &quot;350g&quot;,\n\t   &quot;baking powder&quot;: &quot;1 tbsp&quot;,\n\t   &quot;butter&quot;: &quot;85g&quot;,\n\t   &quot;caster sugar&quot;: &quot;3 tbsp&quot;,\n\t   &quot;milk&quot;: &quot;175ml&quot;,\n\t   &quot;egg&quot;: &quot;1 whole&quot;\n}<\/pre><\/div>\n\n\n\n<p>This dictionary is the same as the one in our last example. The next step is to use the json module to print out our dictionary to the console. We\u2019re going to use a method called json.dumps to format our dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>formatted = json.dumps(scone, indent=4)\nprint(formatted)<\/pre><\/div>\n\n\n\n<p>We specify two parameters when we call the <code>json.dumps()<\/code> method: the name of the dictionary we want to format and how many spaces should constitute each indent. In this example, each indent will be four spaces long.<br><\/p>\n\n\n\n<p>Next, use a <code>print()<\/code> statement to view the formatted dictionary. Let\u2019s execute the program so we can see our dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>{\n\t&quot;self-raising flour&quot;: &quot;350g&quot;,\n\t&quot;baking powder&quot;: &quot;1 tbsp&quot;,\n\t&quot;butter&quot;: &quot;85g&quot;,\n\t&quot;caster sugar&quot;: &quot;3 tbsp&quot;,\n\t&quot;milk&quot;: &quot;175ml&quot;,\n\t&quot;egg&quot;: &quot;1 whole&quot;\n}<\/pre><\/div>\n\n\n\n<p>Our code shows us our list of ingredients.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python: Print a Nested Dictionary<\/h2>\n\n\n\n<p>\u201c<a href=\"https:\/\/careerkarma.com\/blog\/python-nested-dictionary\/\">Nested dictionary<\/a>\u201d is another way of saying \u201ca dictionary in a dictionary\u201d.<br><\/p>\n\n\n\n<p>You can print out a nested dictionary using the <code>json.dumps()<\/code> method and a <code>print()<\/code> statement, or you can use a for loop. The for loop method is similar to our earlier example but we\u2019ll need to change our code a little bit.<br><\/p>\n\n\n\n<p>Suppose that the ingredients in a dictionary within a dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>recipes = {\n\t   &quot;scone&quot;: {\n\t          &quot;self-raising flour&quot;: &quot;350g&quot;,\n\t          &quot;baking powder&quot;: &quot;1 tbsp&quot;,\n\t          &quot;butter&quot;: &quot;85g&quot;,\n\t          &quot;caster sugar&quot;: &quot;3 tbsp&quot;,\n\t          &quot;milk&quot;: &quot;175ml&quot;,\n\t          &quot;egg&quot;: &quot;1 whole&quot;\n\t   }\n}<\/pre><\/div>\n\n\n\n<p>To access the items in our \u201cscone\u201d dictionary, we need to first reference the \u201cscone\u201d key. To print out the dictionary to the console, we use two for loops:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for key, value in recipes.items():\n\t    print(key)\n\t    for k, v in value.items():\n\t\t         print(k, v)<\/pre><\/div>\n\n\n\n<p>The first for loop iterates over our \u201crecipes\u201d dictionary. The second for loop iterates over each dictionary in our \u201crecipes\u201d dictionary, Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>scone\nself-raising flour 350g\nbaking powder 1 tbsp\nbutter 85g\ncaster sugar 3 tbsp\nmilk 175ml\negg 1 whole<\/pre><\/div>\n\n\n\n<p>Our code successfully prints out the contents of our \u201crecipes\u201d dictionary and the contents of the \u201cscone\u201d dictionary.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>You can print a dictionary in Python using either for loops or the json module. The for loop approach is best if you want to display the contents of a dictionary to a console whereas the json module approach is more appropriate for developer use cases.<br><\/p>\n\n\n\n<p>You can use both of these methods to print a nested dictionary to the console.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to print a dictionary to the Python console like an expert developer!<\/p>\n","protected":false},"excerpt":{"rendered":"Dictionaries store data in key-value pairs. This means each value in a dictionary is associated with a key. This key acts as a reference point. If you want to view the contents of a dictionary on the console, there are a few approaches you can take. You can print out a dictionary directly, or print&hellip;","protected":false},"author":240,"featured_media":3435,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-22321","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: How to Print a Dictionary | Career Karma<\/title>\n<meta name=\"description\" content=\"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.\" \/>\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-print-dictionary\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python: How to Print a Dictionary\" \/>\n<meta property=\"og:description\" content=\"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\" \/>\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-09-08T09:15:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"797\" \/>\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\/python-print-dictionary\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python: How to Print a Dictionary\",\"datePublished\":\"2020-09-08T09:15:50+00:00\",\"dateModified\":\"2023-12-01T11:59:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\"},\"wordCount\":741,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\",\"name\":\"Python: How to Print a Dictionary | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg\",\"datePublished\":\"2020-09-08T09:15:50+00:00\",\"dateModified\":\"2023-12-01T11:59:31+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg\",\"width\":1200,\"height\":797},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#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: How to Print a Dictionary\"}]},{\"@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":"Python: How to Print a Dictionary | Career Karma","description":"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.","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-print-dictionary\/","og_locale":"en_US","og_type":"article","og_title":"Python: How to Print a Dictionary","og_description":"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.","og_url":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-09-08T09:15:50+00:00","article_modified_time":"2023-12-01T11:59:31+00:00","og_image":[{"width":1200,"height":797,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.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\/python-print-dictionary\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python: How to Print a Dictionary","datePublished":"2020-09-08T09:15:50+00:00","dateModified":"2023-12-01T11:59:31+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/"},"wordCount":741,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/","url":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/","name":"Python: How to Print a Dictionary | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg","datePublished":"2020-09-08T09:15:50+00:00","dateModified":"2023-12-01T11:59:31+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"You can print a Python dictionary to the console using a for loop or the json.dumps() method. On Career Karma, learn how to print a Python dictionary.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-print-dictionary\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/06\/farzad-nazifi-p-xSl33Wxyc-unsplash.jpg","width":1200,"height":797},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-print-dictionary\/#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: How to Print a Dictionary"}]},{"@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\/22321","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=22321"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22321\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/3435"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}