{"id":15901,"date":"2021-01-17T23:33:43","date_gmt":"2021-01-18T07:33:43","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=15901"},"modified":"2023-12-01T04:08:10","modified_gmt":"2023-12-01T12:08:10","slug":"python-dictionary-keys","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/","title":{"rendered":"Python Dictionary Keys: A Complete Guide"},"content":{"rendered":"\n<p><em>The Python dictionary keys() method returns an object which contains the keys in a dictionary. You can use the list() method to convert the object into a list. The syntax for the keys() method is: dictionary.keys().<\/em><\/p>\n\n\n\n<p>You may want to retrieve a list of all the keys stored in a dictionary.<\/p>\n\n\n\n<p>For instance, say you have a dictionary with information on a book in a library. You may want to retrieve all the keys so you know what kind of information you store.<\/p>\n\n\n\n<p>That\u2019s where the dictionary <em>keys()<\/em> method comes in. This tutorial will discuss, with reference to examples, how to use the dictionary <em>keys()<\/em> method in Python.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Dictionary keys()<\/h2>\n\n\n\n<p>The Python dictionary keys() method returns all the keys in a dictionary. This method returns keys as a special object over which you can iterate. keys() accepts no arguments.<\/p>\n\n\n\n<p>The syntax for the <em>keys()<\/em> method is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dict_name.keys()<\/pre><\/div>\n\n\n\n<p>We add the keys() method after the dictionary name.<\/p>\n\n\n\n<p>The keys() method returns a view object rather than a list of keys. This object is iterable so you can view its contents using a for statement. But, it may be necessary to convert this object to a list.<\/p>\n\n\n\n<p>Suppose you want to print all the keys in the dictionary to the console. You should convert the keys to a list to make the output more readable:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>key_list = list(dictionary.keys())\n\nprint(key_list)<\/pre><\/div>\n\n\n\n<p>This code returns a list of keys. We know our data is in a list because the values are enclosed within square brackets.<\/p>\n\n\n\n<p>Alternatively, say you want to find out the first key in the dictionary. You can do this using indexing. But, you would first need to convert the collection of keys to a list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>key_list = list(dictionary.keys())\n\nprint(key_list[0])<\/pre><\/div>\n\n\n\n<p>This code finds the key at the index position 0 in the list of dict keys.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dictionary keys() Python Example<\/h2>\n\n\n\n<p>We have a dictionary that stores information about an order at a bakery.  This dictionary stores three keys: product, price, and mayo. Each of these keys has a value.<\/p>\n\n\n\n<p>We want to know what information we collect about each order. This is because the bakery is considering adding new information to each order ticket. Before they do so, they want to know all the information they collect.<\/p>\n\n\n\n<p>To retrieve a list of keys in the dictionary, we can use the keys() method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>order = {\n\t'product': 'Ham Sandwich',\n\t'price': 2.10,\n\t'mayo': False\n}\n\norder_keys = order.keys()\n\nprint(order_keys)<\/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>['product','price','mayo']<\/pre><\/div>\n\n\n\n<p>First, we have defined a <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary\/\">Python dictionary <\/a>called <em>order<\/em>. Then, we use <em>order.keys()<\/em> to retrieve a list of keys in the dictionary. We assign this list to the <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">Python variable<\/a> <em>order_keys<\/em>. Next, we print out the value of the <em>order_keys<\/em> variable to the console.<\/p>\n\n\n\n<p>Our code returns all the keys in the dictionary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Updating the Dictionary<\/h3>\n\n\n\n<p>The <em>keys()<\/em> method keeps up to date as we add new keys to our dictionary.&nbsp;<\/p>\n\n\n\n<p>Suppose we add a new key to our dictionary which stores whether the customer paid for their bakery order using a gift card. Here is the code we could use to add this key:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>order = {\n\t'product': 'Ham Sandwich',\n\t'price': 2.10,\n\t'mayo': False\n}\n\norder_keys = order.keys()\n\norder[&quot;gift_card&quot;] = False\n\nprint(order_keys)<\/pre><\/div>\n\n\n\n<p>We use the indexing notation to add a &#8220;gift_card&#8221; key which is associated with the value False. This statement comes after we have assigned the list of keys to the <em>order_keys<\/em> variable. <\/p>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['product','price','mayo','gift_card']<\/pre><\/div>\n\n\n\n<p>We have added one new line. This line creates a new item in our dictionary with the key name <em>gift_card<\/em> and the value False.\n\n<\/p>\n\n\n\n<p>Then, we print out the contents of the <em>order_keys<\/em> variable to the console. Although we retrieved the keys in our dictionary using <em>order.keys()<\/em> before we added our new value, our program still kept track of the change.\n\n<\/p>\n\n\n\n<p>Even after you add new keys, the <em>keys()<\/em> method will store an up-to-date list of all the keys in a dictionary.\n\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check if Key in Dictionary Python<\/h2>\n\n\n\n<p>One common use of the <em>keys()<\/em> method is to check whether a key is in a dictionary. We can check if a key is in a dictionary using the Python in statement. This statement is often used with an if statement.<\/p>\n\n\n\n<p>Suppose we want to check whether the key <em>mayo<\/em> is stored in our <em>order<\/em> dictionary. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>order = {\n\t'product': 'Ham Sandwich',\n\t'price': 2.10,\n\t'mayo': False\n}\n\nif &quot;mayo&quot; in order.keys():\n\tprint(&quot;The 'mayo' key is in the order dictionary.&quot;)\nelse:\n\tprint(&quot;The 'mayo' key is not in the order dictionary&quot;)<\/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>&quot;The 'mayo' key is in the order dictionary.&quot;<\/pre><\/div>\n\n\n\n<p>In our code, we first define our <em>order<\/em> dictionary. We use a <a href=\"https:\/\/careerkarma.com\/blog\/python-if-else\/\"><\/a><a href=\"https:\/\/careerkarma.com\/blog\/python-if-else\/\">Python if&#8230;in statement<\/a> to check whether the <em>mayo<\/em> key can be found in the list of keys generated by <em>order.keys()<\/em>.<\/p>\n\n\n\n<p><em>mayo<\/em> is a key in the <em>order<\/em> dictionary. So, our <em>if<\/em> statement evaluates to true and the code in our <em>if<\/em> statement runs. If we were to remove the <em>mayo<\/em> key, the following response would be returned:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&quot;The 'mayo' key is not in the order dictionary.<\/pre><\/div>\n\n\n\n<p>Our code successfully realizes that <em>mayo<\/em> is no longer a key in the dictionary. So, the contents of our <em>else<\/em> statement run.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The dictionary <em>keys()<\/em> method retrieves a list of the keys in a Python dictionary. When used with an <em>if&#8230;in<\/em> statement, the <em>keys()<\/em> method allows you to check if a key exists in a Python dictionary. The keys() method accepts no arguments.<\/p>\n\n\n\n<p>Do you want to learn more about coding in Python? Read our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python guide<\/a>. You&#8217;ll find expert learning advice and guidance on top online courses and Python resources.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python dictionary keys() method returns an object which contains the keys in a dictionary. You can use the list() method to convert the object into a list. The syntax for the keys() method is: dictionary.keys(). You may want to retrieve a list of all the keys stored in a dictionary. For instance, say you&hellip;","protected":false},"author":240,"featured_media":15902,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-15901","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 Dictionary Keys: A Complete Guide: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.\" \/>\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-dictionary-keys\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Dictionary Keys: A Complete Guide\" \/>\n<meta property=\"og:description\" content=\"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\" \/>\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=\"2021-01-18T07:33:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:08:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\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-dictionary-keys\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Dictionary Keys: A Complete Guide\",\"datePublished\":\"2021-01-18T07:33:43+00:00\",\"dateModified\":\"2023-12-01T12:08:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\"},\"wordCount\":862,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\",\"name\":\"Python Dictionary Keys: A Complete Guide: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg\",\"datePublished\":\"2021-01-18T07:33:43+00:00\",\"dateModified\":\"2023-12-01T12:08:10+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg\",\"width\":1020,\"height\":681},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#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 Dictionary Keys: A Complete 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":"Python Dictionary Keys: A Complete Guide: A Complete Guide | Career Karma","description":"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.","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-dictionary-keys\/","og_locale":"en_US","og_type":"article","og_title":"Python Dictionary Keys: A Complete Guide","og_description":"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.","og_url":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-01-18T07:33:43+00:00","article_modified_time":"2023-12-01T12:08:10+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.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-dictionary-keys\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Dictionary Keys: A Complete Guide","datePublished":"2021-01-18T07:33:43+00:00","dateModified":"2023-12-01T12:08:10+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/"},"wordCount":862,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/","url":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/","name":"Python Dictionary Keys: A Complete Guide: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg","datePublished":"2021-01-18T07:33:43+00:00","dateModified":"2023-12-01T12:08:10+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python dictionary keys() method allows you to retrieve a list of the keys in a dictionary. On Career Karma, learn how to use the dictionary keys() method.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-laptop-1181406.jpg","width":1020,"height":681},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/#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 Dictionary Keys: A Complete 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\/15901","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=15901"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/15901\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/15902"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=15901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=15901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=15901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}