{"id":22296,"date":"2020-09-07T10:30:35","date_gmt":"2020-09-07T17:30:35","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22296"},"modified":"2023-12-01T03:59:25","modified_gmt":"2023-12-01T11:59:25","slug":"python-typeerror-unhashable-type-slice","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/","title":{"rendered":"Python TypeError: unhashable type: \u2018slice\u2019 Solution"},"content":{"rendered":"\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">Values in a Python dictionary<\/a> cannot be sliced like a list. This is because dictionaries can have custom key values. They are not indexed from zero. If you try to slice a dictionary as if it were a list, you\u2019ll encounter the \u201cTypeError: unhashable type: \u2018slice\u2019\u201d error.<br><\/p>\n\n\n\n<p>This guide discusses what this error means and why you see it in your code. It discusses an example of this error to help you solve it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: unhashable type: \u2018slice\u2019<\/h2>\n\n\n\n<p>A slice is a subset of a sequence such as a string, <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">a list<\/a>, or <a href=\"https:\/\/careerkarma.com\/blog\/python-tuples\/\">a tuple<\/a>. The name gives away the purpose of a slice: it is \u201ca slice\u201d of a sequence.<br><\/p>\n\n\n\n<p>Consider the following program:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>news_sites = [&quot;New York Times&quot;, &quot;Washington Post&quot;, &quot;CNN&quot;]\nprint(news_sites[:2])<\/pre><\/div>\n\n\n\n<p>This code retrieves the first two values in our \u201cnews_sites\u201d list and prints them to the console. Our code returns: [\u2018New York Times\u2019, \u2018Washington Post\u2019].<br><\/p>\n\n\n\n<p>This is an example of slicing. You\u2019re retrieving two objects from the list. By specifying a colon and an index value, you are telling Python which objects to retrieve.<br><\/p>\n\n\n\n<p>Dictionaries cannot be sliced like a list. Dictionaries do not have any index numbers and so this syntax does not apply.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: unhashable type: \u2018slice\u2019<\/h2>\n\n\n\n<p>Build a program that displays information about a keyboard for sale at a computer hardware store. To start, define a dictionary with data about a keyboard:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>keyboard = {\n\t  &quot;name&quot;: &quot;Huntsman Mini&quot;,\n\t  &quot;brand&quot;: &quot;Razer&quot;,\n\t  &quot;price&quot;: 119.99,\n\t  &quot;switch_type&quot;: &quot;Razer Switches&quot;,\n}<\/pre><\/div>\n\n\n\n<p>The program stores information about the name of a keyboard, its price, the brand of the keyboard, and the switch type used by the keyboard. You only want to show: the name of a keyboard, the brand of the keyboard, and its price.<br><\/p>\n\n\n\n<p>To do this, use <a href=\"https:\/\/careerkarma.com\/blog\/python-substring\/\">slicing<\/a> to retrieve the first three items in our dictionary. These items are the name of the keyboard, the brand, and the price:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>show_to_customer = keyboard[:3]<\/pre><\/div>\n\n\n\n<p>This code retrieves the first three items in the dictionary. Next, use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> to iterate over this list and print each item to the console:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for s in show_to_customer:\n\t     print(s[1])<\/pre><\/div>\n\n\n\n<p>You use indexing to retrieve the value from each record in the \u201cshow_to_customer\u201d variable. You then print that value to the console using a <code>print()<\/code> statement.<br><\/p>\n\n\n\n<p>Let\u2019s run the code and see what happens:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Traceback (most recent call last):\n  File &quot;main.py&quot;, line 8, in &lt;module&gt;\n\t     show_to_customer = keyboard[:3]\nTypeError: unhashable type: 'slice'<\/pre><\/div>\n\n\n\n<p>Our code returns an error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>Unlike lists, dictionaries cannot be sliced. You cannot retrieve any items in the dictionary using slicing because dictionaries do not have index numbers. Data is stored in key-value pairs. Because dictionaries cannot be sliced, the <code>for<\/code> loop from earlier is not appropriate.<br><\/p>\n\n\n\n<p>You must directly specify what values you want to access from our dictionary. To do this, refer to the appropriate key names in the dictionary.<br><\/p>\n\n\n\n<p>To solve the code, let\u2019s individually access each value you want to display on the console:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>keyboard = {\n\t  &quot;name&quot;: &quot;Huntsman Mini&quot;,\n\t  &quot;brand&quot;: &quot;Razer&quot;,\n\t  &quot;price&quot;: 119.99,\n\t  &quot;switch_type&quot;: &quot;Razer Switches&quot;,\n}\n\nprint(&quot;Name: &quot; + keyboard[&quot;name&quot;])\nprint(&quot;Brand: &quot; + keyboard[&quot;brand&quot;])\nprint(&quot;Price: $&quot; + str(keyboard[&quot;price&quot;]))<\/pre><\/div>\n\n\n\n<p>Each <a href=\"https:\/\/careerkarma.com\/blog\/python-print-without-new-line\/\">print() statement<\/a> refers to a different value from the dictionary. The first print statement prints the label \u201cName: \u201d, followed by the value of \u201cname\u201d in the dictionary, to the console. The second and third statements print the value of \u201cbrand\u201d and \u201cprice\u201d to the console, respectively.<br><\/p>\n\n\n\n<p>You convert the \u201cprice\u201d value to a string using the <code>str()<\/code> method to concatenate it with the \u201cPrice: $\u201d label using the <a href=\"https:\/\/careerkarma.com\/blog\/python-concatenate-strings\/\">concatenation operator (+)<\/a>.<br><\/p>\n\n\n\n<p>Let\u2019s run our new program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Name: Huntsman Mini\nBrand: Razer\nPrice: $119.99<\/pre><\/div>\n\n\n\n<p>The code successfully prints out the three pieces of information you wanted to display to the console. The user can see the name, brand, and price of a keyboard.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: unhashable type: \u2018slice\u2019\u201d error is raised when you try to access items from a dictionary using slicing syntax. To solve this error, make sure you refer to the items you want to access from a dictionary directly.<br><\/p>\n\n\n\n<p>Now you have the knowledge you need to solve this error like an expert!<\/p>\n","protected":false},"excerpt":{"rendered":"Values in a Python dictionary cannot be sliced like a list. This is because dictionaries can have custom key values. They are not indexed from zero. If you try to slice a dictionary as if it were a list, you\u2019ll encounter the \u201cTypeError: unhashable type: \u2018slice\u2019\u201d error. This guide discusses what this error means and&hellip;","protected":false},"author":240,"featured_media":5292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-22296","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 TypeError: unhashable type: \u2018slice\u2019 Solution | Career Karma<\/title>\n<meta name=\"description\" content=\"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.\" \/>\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-typeerror-unhashable-type-slice\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python TypeError: unhashable type: \u2018slice\u2019 Solution\" \/>\n<meta property=\"og:description\" content=\"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\" \/>\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-07T17:30:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: unhashable type: \u2018slice\u2019 Solution\",\"datePublished\":\"2020-09-07T17:30:35+00:00\",\"dateModified\":\"2023-12-01T11:59:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\"},\"wordCount\":610,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\",\"name\":\"Python TypeError: unhashable type: \u2018slice\u2019 Solution | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg\",\"datePublished\":\"2020-09-07T17:30:35+00:00\",\"dateModified\":\"2023-12-01T11:59:25+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#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 TypeError: unhashable type: \u2018slice\u2019 Solution\"}]},{\"@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 TypeError: unhashable type: \u2018slice\u2019 Solution | Career Karma","description":"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.","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-typeerror-unhashable-type-slice\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: unhashable type: \u2018slice\u2019 Solution","og_description":"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-09-07T17:30:35+00:00","article_modified_time":"2023-12-01T11:59:25+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: unhashable type: \u2018slice\u2019 Solution","datePublished":"2020-09-07T17:30:35+00:00","dateModified":"2023-12-01T11:59:25+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/"},"wordCount":610,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/","name":"Python TypeError: unhashable type: \u2018slice\u2019 Solution | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg","datePublished":"2020-09-07T17:30:35+00:00","dateModified":"2023-12-01T11:59:25+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The TypeError: unhashable type: \u2018slice\u2019 error is raised when you try to slice a dictionary. On Career Karma, learn how to solve this common Python error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/08\/brooke-cagle-g1Kr4Ozfoac-unsplash.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-slice\/#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 TypeError: unhashable type: \u2018slice\u2019 Solution"}]},{"@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\/22296","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=22296"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22296\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/5292"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}