{"id":21926,"date":"2020-08-31T11:32:47","date_gmt":"2020-08-31T18:32:47","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21926"},"modified":"2023-12-01T03:59:00","modified_gmt":"2023-12-01T11:59:00","slug":"python-typeerror-unhashable-type-list","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/","title":{"rendered":"Python TypeError: unhashable type: \u2018list\u2019 Solution"},"content":{"rendered":"\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-add-to-dictionary\/\">Python dictionaries<\/a> only accept hashable data types as a key in a dictionary. A list is not a hashable data type. If you specify a list as a key in a dictionary, you\u2019ll encounter a \u201cTypeError: unhashable type: \u2018list\u2019\u201d error.<br><\/p>\n\n\n\n<p>In this guide, we talk about what this error means and why you see it in your code. We\u2019ll walk through an example of this error to show you how to solve it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: unhashable type: \u2018list\u2019<\/h2>\n\n\n\n<p>Dictionaries have two parts: keys and values. Keys are the labels associated with a particular value. To access a value, you must reference that value\u2019s key name.<br><\/p>\n\n\n\n<p>While values can be of any data type, from <a href=\"https:\/\/careerkarma.com\/blog\/how-to-initialize-a-list-in-python\/\">lists<\/a> to <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">strings<\/a>, only hashable objects are acceptable as keys. Hashable objects are objects with a hash value that does not change over time.&nbsp; Examples of hashable objects are tuples and strings.<br><\/p>\n\n\n\n<p>Lists do not have an unchanging hash value. Their hash values can change over time. This means you cannot specify a list as a dictionary key.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Example Scenario<\/h2>\n\n\n\n<p>Let\u2019s build a program that creates a list of students who have an average grade of over 75. This list will contain dictionary records of each student and their grades. To create this dictionary, we\u2019ll work from a dictionary with a list of all the students in a school and their grades.<br><\/p>\n\n\n\n<p>Let\u2019s start by defining a list of students and a dictionary for our top students:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = [\n\t{ &quot;name&quot;: &quot;Linda&quot;, &quot;grades&quot;: [84, 82, 65] },\n\t{ &quot;name&quot;: &quot;Alex&quot;, &quot;grades&quot;: [67, 68, 83] },\n\t{ &quot;name&quot;: &quot;Holly&quot;, &quot;grades&quot;: [72, 74, 81] }\n]\ntop_students = {}<\/pre><\/div>\n\n\n\n<p>Each value in the \u201cstudents\u201d list is a dictionary. Each dictionary contains two keys: name and grades. We have defined a dictionary called \u201ctop_students\u201d which will contain the information about our top students.<br><\/p>\n\n\n\n<p>Now that we have defined this dictionary, we use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> to filter out students whose average grades are over 75 and add them to our new dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for s in students:\n\t\t average = sum(s[&quot;grades&quot;]) \/ len(s[&quot;grades&quot;])\n\t\t if average &gt; 75:\n\t\t         top_students[s[&quot;grades&quot;]] =s[&quot;name&quot;]<\/pre><\/div>\n\n\n\n<p>In each iteration of the for loop, we calculate the <a href=\"https:\/\/careerkarma.com\/blog\/python-average\/\">average of all the grades<\/a> a student has earned. We do this by dividing the total of all grades by how many grades have been recorded.<br><\/p>\n\n\n\n<p>Next, we check if that average is greater than 75. If it is, we create a new entry in the top_students dictionary with the name of a student and their grades.<br><\/p>\n\n\n\n<p>Finally, we print the top_students dictionary to the console so we see all the students who have an average grade of over 75:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(top_students)<\/pre><\/div>\n\n\n\n<p>Run our 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 11, in &lt;module&gt;\n\ttop_students[s[&quot;grades&quot;]] = s[&quot;name&quot;]\nTypeError: unhashable type: 'list'<\/pre><\/div>\n\n\n\n<p>Our code fails to execute successfully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>Our code works up until the interpreter reaches line 11. On this line, our code states:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>top_students[s[&quot;grades&quot;]] = s[&quot;name&quot;]<\/pre><\/div>\n\n\n\n<p>The error in our code is because we\u2019ve tried to assign a list as a key in a dictionary. When our code parses this line on the first iteration of our loop, our code tries to create a dictionary with the following key and value:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>{ [84, 82, 65]: &quot;Linda&quot; }<\/pre><\/div>\n\n\n\n<p>This is an invalid dictionary. Our code tries to assign a list as a key which does not work.<br><\/p>\n\n\n\n<p>To solve this problem, we use the student\u2019s name as a key in the dictionary instead of the list of grades:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>top_students[s[&quot;name&quot;]] = s[&quot;grades&quot;]<\/pre><\/div>\n\n\n\n<p>We\u2019ve assigned the <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">list of grades<\/a> as a value instead of as a key. The student\u2019s name is the key in the dictionary. Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>{'Linda': [84, 82, 65], 'Holly': [72, 74, 81]}<\/pre><\/div>\n\n\n\n<p>Our code successfully creates a dictionary with information about the top-performing students. Any student whose average grade on their last three tests is over 75 was added to the dictionary.<br><\/p>\n\n\n\n<p>Our dictionary breaks down as follows:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Keys: Linda, Holly<\/li><li>Values: [84, 82, 65], [72, 74, 81]<\/li><\/ul>\n\n\n\n<p>Because we are now assigning strings to our key names, our code works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: unhashable type: \u2018list\u2019\u201d error is raised when you try to assign a list as a key in a dictionary. To solve this error, ensure you only assign a hashable object, such as a string or a tuple, as a key for a dictionary.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to solve this error like a professional coder!<\/p>\n","protected":false},"excerpt":{"rendered":"Python dictionaries only accept hashable data types as a key in a dictionary. A list is not a hashable data type. If you specify a list as a key in a dictionary, you\u2019ll encounter a \u201cTypeError: unhashable type: \u2018list\u2019\u201d error. In this guide, we talk about what this error means and why you see it&hellip;","protected":false},"author":240,"featured_media":21927,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-21926","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: \u2018list\u2019 Solution | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this 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-list\/\" \/>\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: \u2018list\u2019 Solution\" \/>\n<meta property=\"og:description\" content=\"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\" \/>\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-08-31T18:32:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\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-list\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: unhashable type: \u2018list\u2019 Solution\",\"datePublished\":\"2020-08-31T18:32:47+00:00\",\"dateModified\":\"2023-12-01T11:59:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\"},\"wordCount\":663,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\",\"name\":\"Python TypeError: unhashable type: \u2018list\u2019 Solution | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg\",\"datePublished\":\"2020-08-31T18:32:47+00:00\",\"dateModified\":\"2023-12-01T11:59:00+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#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: \u2018list\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: \u2018list\u2019 Solution | Career Karma","description":"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this 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-list\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: unhashable type: \u2018list\u2019 Solution","og_description":"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-31T18:32:47+00:00","article_modified_time":"2023-12-01T11:59:00+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-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-list\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: unhashable type: \u2018list\u2019 Solution","datePublished":"2020-08-31T18:32:47+00:00","dateModified":"2023-12-01T11:59:00+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/"},"wordCount":663,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/","name":"Python TypeError: unhashable type: \u2018list\u2019 Solution | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg","datePublished":"2020-08-31T18:32:47+00:00","dateModified":"2023-12-01T11:59:00+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python TypeError: unhashable type: \u2018list\u2019 is raised when you try to assign a list as a key in a dictionary. On Career Karma, learn how to fix this error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/pankaj-patel-jmEwNM588-E-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unhashable-type-list\/#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: \u2018list\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\/21926","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=21926"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21926\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/21927"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}