{"id":21938,"date":"2020-08-31T13:08:13","date_gmt":"2020-08-31T20:08:13","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21938"},"modified":"2023-12-01T03:59:21","modified_gmt":"2023-12-01T11:59:21","slug":"python-valueerror-max-arg-is-an-empty-sequence","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/","title":{"rendered":"Python ValueError: max() arg is an empty sequence Solution"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\">max() method<\/a> only works if you pass a sequence with at least one value into the method.<br><\/p>\n\n\n\n<p>If you try to find the largest item in an empty list, you\u2019ll encounter the error \u201cValueError: <code>max()<\/code> arg is an empty sequence\u201d.<br><\/p>\n\n\n\n<p>In this guide, we talk about what this error means and why you may encounter it. We walk through an example to help you figure out how to resolve this error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ValueError: max() arg is an empty sequence<\/h2>\n\n\n\n<p>The <code>max()<\/code> method lets you find the largest item in a list. It is similar to the <code>min()<\/code> method which finds the smallest item in a list.<br><\/p>\n\n\n\n<p>For this method to work, <code>max()<\/code> needs a sequence with at least one value. This is because you cannot find the largest item in a list if there are no items. The largest item is non-existent because there are no items to search through.<br><\/p>\n\n\n\n<p>A variation of the \u201cValueError: <code>max()<\/code> arg is an empty sequence\u201d error is found when you try to pass an empty list into the <code>min()<\/code> method. This error is \u201cValueError: <code>min()<\/code> arg is an empty sequence\u201d. This <code>min()<\/code> error occurs for the same reason: you cannot find the smallest value in a list with no values.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Example Scenario<\/h2>\n\n\n\n<p>We\u2019re going to build a program that finds the highest grade a student has earned in all their chemistry tests. To start, define a <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">list of students<\/a>:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = [\n\t   { &quot;name&quot;: &quot;Ron&quot;, &quot;grades&quot;: [75, 92, 84] },\n\t   { &quot;name&quot;: &quot;Katy&quot;, &quot;grades&quot;: [92, 86, 81] },\n\t   { &quot;name&quot;: &quot;Rachel&quot;, &quot;grades&quot;: [64, 72, 72] },\n\t   { &quot;name&quot;: &quot;Miranda&quot;, &quot;grades&quot;: [] }\n]<\/pre><\/div>\n\n\n\n<p>Our list of students contains <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">four dictionaries<\/a>. These dictionaries contain the names of each student as well as a list of the grades they have earned. Miranda does not have any grades yet because she has just joined the chemistry class.<br><\/p>\n\n\n\n<p>Next, use a for loop to go through each student in our list of students and find the highest grade each student has earned and the average grade of each student:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for s in students:\n\t     highest_grade = max(s[&quot;grades&quot;])\n\t     average_grade = round(sum(s[&quot;grades&quot;]) \/ len(s[&quot;grades&quot;]))\n\t     print(&quot;The highest grade {} has earned is {}. Their average grade is {}.&quot;.format(s[&quot;name&quot;], highest_grade, average_grade))<\/pre><\/div>\n\n\n\n<p>We use the <code>max()<\/code> function to find the highest grade a student has earned. To calculate a student\u2019s average grade, we <a href=\"https:\/\/careerkarma.com\/blog\/python-average\/\">divide the total of all their grades by the number of grades they have received<\/a>.<br><\/p>\n\n\n\n<p>We round each student\u2019s average grade to the nearest whole number using the <code>round()<\/code> method.<br><\/p>\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>The highest grade Ron has earned is 92. Their average grade is 84.\nThe highest grade Katy has earned is 92. Their average grade is 86.\nThe highest grade Rachel has earned is 72. Their average grade is 69.\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 10, in &lt;module&gt;\n\t     highest_grade = max(s[&quot;grades&quot;])\nValueError: max() arg is an empty sequence<\/pre><\/div>\n\n\n\n<p>Our code runs successfully until it reaches the fourth item in our list. We can see Ron, Katy, and Rachel\u2019s highest and average grades. We cannot see any values for Miranda.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>Our code works on the first three students because each of those students have a list of grades with at least one grade. Miranda does not have any grades yet.&nbsp;<br><\/p>\n\n\n\n<p>Because Miranda does not have any grades, the <code>max()<\/code> function fails to execute. <code>max()<\/code> cannot find the largest value in an empty list.<br><\/p>\n\n\n\n<p>To solve this error, see if each list of grades contains any values before we try to calculate the highest grade in a list. If a list contains no values, we should show a different message to the user.<br><\/p>\n\n\n\n<p>Let\u2019s use an <a href=\"https:\/\/careerkarma.com\/blog\/python-if-else\/\">\u201cif\u201d statement<\/a> to check if a student has any grades before we perform any calculations:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for s in students:\n\t     if len(s[&quot;grades&quot;]) &gt; 0:\n\t               highest_grade = max(s[&quot;grades&quot;])\n\t               average_grade = round(sum(s[&quot;grades&quot;]) \/ len(s[&quot;grades&quot;]))\n\t               print(&quot;The highest grade {} has earned is {}. Their                average grade is {}.&quot;.format(s[&quot;name&quot;], highest_grade, average_grade))\n\t     else:\n\t\t           print(&quot;{} has not earned any grades.&quot;.format(s[&quot;name&quot;]))<\/pre><\/div>\n\n\n\n<p>Our code above will only calculate a student\u2019s highest and average grade if they have earned at least one grade. Otherwise, the user will be informed that the student has not earned any grades. Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The highest grade Ron has earned is 92. Their average grade is 84.\nThe highest grade Katy has earned is 92. Their average grade is 86.\nThe highest grade Rachel has earned is 72. Their average grade is 69.\nMiranda has not earned any grades.<\/pre><\/div>\n\n\n\n<p>Our code successfully calculates the highest and average grades for our first three students. When our code reaches Miranda, our code does not calculate her highest and average grades. Instead, our code informs us that Miranda has not earned any grades yet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cValueError: <code>max()<\/code> arg is an empty sequence\u201d error is raised when you try to find the largest item in an empty list using the <code>max()<\/code> method.<br><\/p>\n\n\n\n<p>To solve this error, make sure you only pass lists with at least one value through a <code>max()<\/code> statement. Now you have the knowledge you need to fix this problem like a <a href=\"https:\/\/careerkarma.com\/blog\/python-vs-c-plus-plus\/\">professional coder<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"The max() method only works if you pass a sequence with at least one value into the method. If you try to find the largest item in an empty list, you\u2019ll encounter the error \u201cValueError: max() arg is an empty sequence\u201d. In this guide, we talk about what this error means and why you may&hellip;","protected":false},"author":240,"featured_media":18671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-21938","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 ValueError: max() arg is an empty sequence Solution | CK<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the 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-valueerror-max-arg-is-an-empty-sequence\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python ValueError: max() arg is an empty sequence Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\" \/>\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-31T20:08:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-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=\"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-valueerror-max-arg-is-an-empty-sequence\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python ValueError: max() arg is an empty sequence Solution\",\"datePublished\":\"2020-08-31T20:08:13+00:00\",\"dateModified\":\"2023-12-01T11:59:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\"},\"wordCount\":654,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\",\"name\":\"Python ValueError: max() arg is an empty sequence Solution | CK\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg\",\"datePublished\":\"2020-08-31T20:08:13+00:00\",\"dateModified\":\"2023-12-01T11:59:21+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#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 ValueError: max() arg is an empty sequence 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 ValueError: max() arg is an empty sequence Solution | CK","description":"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the 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-valueerror-max-arg-is-an-empty-sequence\/","og_locale":"en_US","og_type":"article","og_title":"Python ValueError: max() arg is an empty sequence Solution","og_description":"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-31T20:08:13+00:00","article_modified_time":"2023-12-01T11:59:21+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-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-valueerror-max-arg-is-an-empty-sequence\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python ValueError: max() arg is an empty sequence Solution","datePublished":"2020-08-31T20:08:13+00:00","dateModified":"2023-12-01T11:59:21+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/"},"wordCount":654,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/","url":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/","name":"Python ValueError: max() arg is an empty sequence Solution | CK","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg","datePublished":"2020-08-31T20:08:13+00:00","dateModified":"2023-12-01T11:59:21+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn about the Python ValueError: max() arg is an empty sequence, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/caspar-camille-rubin-oI6zrBj3nKw-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/#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 ValueError: max() arg is an empty sequence 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\/21938","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=21938"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21938\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18671"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}